Skip to content
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

Resolve monkey-patched JS constructors better in Dartium #24776

Closed
alan-knight opened this issue Oct 30, 2015 · 5 comments
Closed

Resolve monkey-patched JS constructors better in Dartium #24776

alan-knight opened this issue Oct 30, 2015 · 5 comments
Assignees
Labels
P2 A bug or feature request we're likely to work on web-dart2js web-js-interop Issues that impact all js interop
Milestone

Comments

@alan-knight
Copy link
Contributor

zones.js replaces MutationObserver with an unnamed constructor. wrap_jso uses the name to look up the wrapper, so it fails in that case. We should handle that case more robustly. I think we have some logic for that already, it just needs to be extended to non-custom elements. We should also probably take a look at how dart2js looks up interceptors and make sure we're compatible with that. Justin mentioned that Stephen had at one point talked about pulling that logic out.
@rakudrama @justinfagnani

@alan-knight alan-knight added P1 A high priority bug; for example, a single project is unusable or has many test failures web-dart2js Area-Dartium web-js-interop Issues that impact all js interop labels Oct 30, 2015
@alan-knight alan-knight added this to the 1.14 milestone Oct 30, 2015
@sigmundch
Copy link
Member

Some of it was made available to support the web components polyfill in the past (which wrapped almost every single JS object). Maybe that is what you need here too?

Take a look at: https://github.com/dart-lang/web-components/blob/8cf45405f966d57fdade70a2e0138a20d87962f6/lib/dart_support.js

in particular how we define a transformer in window.dartNativeDispatchHooksTransformer.

@sigmundch
Copy link
Member

Do you have something else in mind or is the dartNativeDispatchHooksTransformer sufficent? If so, maybe we can close this issue?

@sigmundch sigmundch added Priority-Medium and removed P1 A high priority bug; for example, a single project is unusable or has many test failures labels Dec 10, 2015
@kevmoo kevmoo modified the milestones: 1.14, 1.15 Jan 14, 2016
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on and removed Priority-Medium labels Mar 1, 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
@terrylucas
Copy link
Contributor

Alan does the problem still exist and if so would Siggi's solution work?

@alan-knight
Copy link
Contributor Author

According to angular/zone.js#197 the motivating example has been rewritten. It might need the Polymer DevTools extension to be updated to that version, but the problem should go away. I think the kind of fix that Siggi mentioned would work, but if we don't have any actual problems with it it may not be that important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 A bug or feature request we're likely to work on web-dart2js web-js-interop Issues that impact all js interop
Projects
None yet
Development

No branches or pull requests

5 participants