Skip to content

[JS interop] "window." doesn't work in Dartium #24817

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
goderbauer opened this issue Nov 3, 2015 · 4 comments
Closed

[JS interop] "window." doesn't work in Dartium #24817

goderbauer opened this issue Nov 3, 2015 · 4 comments
Assignees
Labels
web-js-interop Issues that impact all js interop

Comments

@goderbauer
Copy link
Contributor

I am using the new JS Interop. I tried to access the foo property of the window object with the following code:

@JS("window.foo")
external List<Function> get foo;

When I pub serve my dart application and access it in dartium, I am getting the following error:

Class 'Window' has no instance method '[]'.
NoSuchMethodError: method not found: '[]'
Receiver: Instance of 'Window'
Arguments: ["foo"]

When I remove the window. from the annotation, everything works as expected. However, I would still expect it to work with the window. as well since that is where this property lives.

@jacob314 jacob314 added the web-js-interop Issues that impact all js interop label Nov 3, 2015
@jacob314 jacob314 added this to the 1.14 milestone Nov 3, 2015
@jacob314 jacob314 self-assigned this Nov 3, 2015
@jacob314
Copy link
Member

jacob314 commented Nov 3, 2015

Note.
@js("foo") works fine. The issue is automatically converting dom types in dart:html is messing up the dartium implementation for this case.
The issue is in dartium only. dart2js handles this case correctly.

@jacob314 jacob314 closed this as completed Nov 3, 2015
@jacob314 jacob314 reopened this Nov 3, 2015
@mit-mit
Copy link
Member

mit-mit commented Dec 28, 2015

@jacob314 any news on this?

@kevmoo kevmoo modified the milestones: 1.14, 1.15 Jan 14, 2016
@mit-mit
Copy link
Member

mit-mit commented Mar 2, 2016

Clearing out 1.15 milestone as the last full push to dev has happened. If any changes are required before 1.15 is shipped, please file a merge request

@mit-mit mit-mit modified the milestones: 1.16, 1.15 Mar 2, 2016
@kevmoo kevmoo added the S1 high label Apr 21, 2016
@kevmoo kevmoo removed this from the 1.16 milestone Apr 21, 2016
@jacob314 jacob314 mentioned this issue Jul 8, 2016
19 tasks
@jacob314
Copy link
Member

Fixed a while ago. Regression test checked in here:
bcf224b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web-js-interop Issues that impact all js interop
Projects
None yet
Development

No branches or pull requests

4 participants