{"json_modified": "2016-03-28T08:11:44.829800", "uuid": "3c843e69-c88e-4047-99ed-8e792540da60", "title": "JavaScript-DOM Prototypes in Mozilla", "url": "/en-US/docs/JavaScript-DOM_Prototypes_in_Mozilla", "tags": ["DOM"], "translations": [], "modified": "2014-03-26T02:47:51", "label": "JavaScript-DOM Prototypes in Mozilla", "localization_tags": [], "locale": "en-US", "id": 12449, "last_edit": "2010-07-27T03:41:55", "summary": "When a DOM node is accessed from JavaScript in Mozilla, the native C++ DOM node is wrapped using XPConnect and the wrapper is exposed to JavaScript as the JavaScript representation of the DOM node. When XPConnect wraps a C++ object it will create a JSObject
that is unique to this C++ object. In the case where the C++ object has class info (nsIClassInfo), the JSObject
is a more or less empty JSObject
which is not really that special. All the methods that are supposed to show up on this JSObject
are actually not properties of the object itself, but rather properties of the prototype of the JSObject
for the wrapper (unless the C++ object's class info has the flag nsIXPCScriptable::DONT_SHARE_PROTOTYPE
set, but lets assume that's not the case here).", "sections": [{"id": "Prototype_setup_on_an_XPConnect_wrapped_DOM_node_in_Mozilla", "title": "Prototype setup on an XPConnect wrapped DOM node in Mozilla"}, {"id": "Non_Standard", "title": "Non Standard"}, {"id": "So_how_does_all_this_work_in_the_Mozilla_DOM_code.3F", "title": "So how does all this work in the Mozilla DOM code?"}, {"id": "Original_Document_Information", "title": "Original Document Information"}], "slug": "JavaScript-DOM_Prototypes_in_Mozilla", "review_tags": []}