Skip to content

Nul character in strings is not passed view dart:js callMethod #15015

Open
@DartBot

Description

This issue was originally filed by chris.e...@gmail.com


What steps will reproduce the problem?

  1. Define a string with a NUL character like: new String.fromCharCodes([82, 0, 82, 82])
  2. Send it via a dart:js context.callMethod()
  3. Check the value in JavaScript

I expect the NUL character (and everything afterwards) to be sent. This is how JavaScript functions work.

$ dart --version
Dart VM version: 0.8.10.6_r30036 (Thu Nov 7 01:23:45 2013) on "linux_x64"

The attached files will reproduce. The string that I send from Dart has 4 characters, but arrives with one character in the JavaScript function.


Attachments:
index.html (174 Bytes)
pubspec.yaml (68 Bytes)
read_string.js (75 Bytes)
make_string.dart (171 Bytes)

Metadata

Assignees

No one assigned

    Labels

    area-webUse area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.library-jstype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)web-js-interopIssues that impact all js interop

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions