Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Support cross-frame dom objects #517

Closed
jacob314 opened this issue Apr 20, 2016 · 5 comments
Closed

Support cross-frame dom objects #517

jacob314 opened this issue Apr 20, 2016 · 5 comments

Comments

@jacob314
Copy link
Contributor

jacob314 commented Apr 20, 2016

DDC support for cross-frame dom objects are incorrect as it depends on dart:js concepts of interceptors. Supporting this correctly will require a way to apply dart extension methods to a new child window when that window object is referenced through dart:html.

(edit by @jmesserly: split custom elements to #521)

@jacob314 jacob314 self-assigned this Apr 20, 2016
@jmesserly
Copy link
Contributor

Supporting this correctly will require a way to apply dart extension methods to a new child window when that window object is referenced through dart:html.

I don't follow the relation to window object or how that comes into play?

@jacob314
Copy link
Contributor Author

dart:html has hooks where every time you have a dom method that returns a window you check whether the window is the window. if it is not the window you wrap it as a limited functionality cross-domain window so that you don't get access to cross-frame objects.
in dart2js this was mainly just to support dartium. in dev compiler, the extension method design means you would need to add a whole ton of extension methods to all objects from the window's context if you wanted them to play nicely with dev compiler.

@vsmenon
Copy link
Contributor

vsmenon commented Apr 21, 2016

Right, the actual prototype objects are different in each iframe / window. So, the Window or HTMLCanvasElement protos in a frame are different from the ones on the top-level page. Same with native Array for that matter.

The dart.registerExtension commands we execute only affect the top-level context. We'd need to reapply those somehow to the new contexts (windows).

@jmesserly jmesserly changed the title Support cross-frame dom objects and custom elements correctly in ddc Support cross-frame dom objects Apr 21, 2016
@jmesserly
Copy link
Contributor

Sorry about that, I was super confused because I didn't see what "cross frame dom objects" had to do with "custom elements" ... I split custom elements into its own bug.

@vsmenon
Copy link
Contributor

vsmenon commented Jan 10, 2017

This issue was moved to dart-lang/sdk#28326

@vsmenon vsmenon closed this as completed Jan 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants