[Jscustomtonativeobject](i),[Jscustomfinalize](i),[customisreachable](i),[Jscustommarkfunction](i),[Jscustomnamedgetteronprototype](i),[Jscustompusheventhandlerscope](i),[Jscustomdefineownproperty](i),[Jscustomdefineownpropertyonprototype](i),[Jscustomgetownpropertyslotanddescriptor](i)
Overview: These syntaxes allow you to write JavaScriptCore-related binding code that would otherwise be automatically generated by default.
Usage:
[ Jscustomtonativeobject, jscustomfinalize, customisreachable, jscustommarkfunction, Jscustomnamedgetteronprototype, Jscustompusheventhandlerscope, Jscustomdefineownproperty, Jscustomdefineownpropertyonprototype, jscustomgetownpropertyslotanddescriptor ] interface XXX { };
You can write the following series of functions in this file: Webcore/bindings/js/jsxxxcustom.cpp. For more examples, please refer to document Webcore/bindings/js/jsxxxcustom.cpp
- [Jscustomtonativeobject]: For example, you can write your own Todomwindow (...):
Passrefptr<domwindow> Todomwindow (jsglobaldata& globalData, jsvalue value) { ...; }
- [Jscustomfinalize]: Define your own Finalize function:
void Jsxxxowner::finalize (jsc::handle<jsc::unknown> Handle, void* context) { ...; }
- [customisreachable]: define your own isreachablefromopaqueroots function :
BOOL Jsxxxowner::isreachablefromopaqueroots (jsc::handle<jsc::unknown> Handle, void* context, slotvisitor& Visitor) { ...; }
- [jscustommarkfunction]: define your own jsxxx::visitchildren (...) function :
void Jsxxx::visitchildren (jscell* cell, slotvisitor& visitor) { ...; }
- [ Jscustomnamedgetteronprototype] : define your own jsxxxprototype::p utdelegate (...) function :
BOOL Jsxxxprototype::p utdelegate (execstate* exec, const identifier& propertyname, Jsvalue value, Putpropertyslot & slots) { ...; }
- [Jscustompusheventhandlerscope]: define your own jsxxx::p usheventhandlerscope (...) function :
scopechainnode* jsxxx::p usheventhandlerscope (execstate* exec, scopechainnode* node) const { ...; }
- [Jscustomdefineownproperty]: define your own jsxxx::d efineownproperty (...) function :
BOOL Jsxxx::d efineownproperty (jsobject* object, execstate* exec, const identifier& PropertyName, propertydescriptor& descriptor, bool throwexception) { ...; }
- [Jscustomdefineownpropertyonprototype]: define your own prototype properties jsxxxprototype:: Defineownproperty (...):
BOOL Jsxxxprototype::d efineownproperty (jsobject* object, execstate* exec, const identifier& PropertyName, propertydescriptor& descriptor, bool throwexception) { ...; }
- [Jscustomgetownpropertyslotanddescriptor]: define your own jsxxx::getownpropertyslotdelegate (...) and jsxxx::getownpropertydescriptordelegate (...) function :
BOOL Jsxxx::getownpropertyslotdelegate (execstate* exec, const identifier& PropertyName, propertyslot& slots) { ...; } BOOL Jsxxx::getownpropertydescriptordelegate (execstate* exec, const identifier& PropertyName, PropertyDescriptor & descriptor) { ...; }
Webkit IDL's various custom interfaces