Changes between Version 4 and Version 5 of DOMInJavaScript
- Timestamp:
- Sep 26, 2012 11:36:44 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DOMInJavaScript
v4 v5 26 26 27 27 In order to get or set the nextSibling property, the C++ code needs to consult its JavaScript wrapper. (Note: This implies that we'll need to eagerly creata JavaScript wrappers for DOM nodes.) In this approach, the JavaScript wrapper stores the four DOM pointers at fixed offsets in memory, letting the C++ code read or write the property directly rather than having to do a hash table lookup. 28 29 My understanding is that fastGetProperty is similar to JSC::JSObject::getDirectOffset, the key is to create JavaScript wrappers for DOM nodes in such a way that initial offsets are know to correspond to particular properties (e.g., the four basic DOM pointers.)