Confirmed users
839
edits
No edit summary |
No edit summary |
||
| Line 24: | Line 24: | ||
/be | /be | ||
To pull this off it seems like we'd need to do the following (the above in more detail...): | |||
* Create a new JS scope object, i.e. the inner global object. This won't be a native object wrapped by XPConnect, but simply a JSClass (JSExtendedClass) whose private data points to an object that knows the principals and the native global (outer, e.g. nsGlobalWindow). Though this object needs to somehow get all the standard JS classes and the methods etc exposed on the global object by XPConnect. | |||
* Write a JSExtendedClass::equality hook implementation on it (which is fun, since JSExtendedClass doesn't exist on the aviary or 1.7 branches), and make the equality hook on the wrapped native for the outer global do the same (probably mean we need an nsIXPCScriptable::Equality() method). | |||
* Move most of the current nsWindowSH logic to the JSExtendedClass for the inner window. | |||
* Write a new nsWindowSH that does the appropriate security checks and the forwarding of gets/sets to the inner. | |||
* Make all nameable references to the inner window "exterize" the reference, that means a get of the below properties needs to return the outer window. Anyone think of any more of these? | |||
** this | |||
** window | |||
** self | |||
** parent | |||
** top | |||
** frames | |||
** __parent__ | |||
** content (and _content) | |||
** opener (?) | |||
--[[User:Jst|Jst]] 17:21, 24 Jun 2005 (PDT) | |||