mozilla / positron

a experimental, Electron-compatible runtime on top of Gecko
Other
569 stars 64 forks source link

make the window object be the global object for modules in renderer processes #51

Closed mykmelez closed 8 years ago

mykmelez commented 8 years ago

@marcoscaceres This is another step toward implementing <webview>, as the modules that implement it (and the other modules that get loaded in the renderer process) all assume that their global object is the DOMWindow object for the renderer window, and they access a variety of DOMWindow built-ins on it.

Instead of identifying each individual built-in those modules use and then manually adding them to the global that the ModuleLoader creates, this branch makes the DOMWindow object itself be the global, so all of its built-ins are available to renderer process modules.

Doing this means that the process global for those objects is now the one we bind to DOMWindow via WebIDL, and that entrained some changes to the way we expose its properties and methods Basically: we had to explicitly expose them via WebIDL, which we needed to do eventually anyway (in order for the web page itself to have access to them).

marcoscaceres commented 8 years ago

Couple of questions would like to see clarified before merge. Excited to see the foundations coming together 👍

marcoscaceres commented 8 years ago

Thanks for the clarifications.