Changes between Version 6 and Version 7 of DOMInJavaScript
- Timestamp:
- Sep 27, 2012, 12:02:17 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DOMInJavaScript
v6 v7 25 25 }}} 26 26 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 creat aJavaScript 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.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 create 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 28 29 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.)