Various custom interfaces of Webkit IDL and webkitidl
[JSCustomToNativeObject](I ),[JSCustomFinalize](I ),[CustomIsReachable](I ),[JSCustomMarkFunction](I ),[JSCustomNamedGetterOnPrototype](I ),[JSCustomPushEventHandlerScope](I ),[JSCustomDefineOwnProperty](I ),[JSCustomDefineOwnPropertyOnPrototype](I ),[JSCustomGetOwnPropertySlotAndDescriptor](I)
Summary: These syntaxes allow you to write JavaScriptCore-related binding code, which will be automatically generated by default.
Usage:
[ JSCustomToNativeObject, JSCustomFinalize, CustomIsReachable, JSCustomMarkFunction, JSCustomNamedGetterOnPrototype, JSCustomPushEventHandlerScope, JSCustomDefineOwnProperty, JSCustomDefineOwnPropertyOnPrototype, JSCustomGetOwnPropertySlotAndDescriptor ] interface XXX { };
You can compile the following series of functions in this file: WebCore/bindings/js/JSXXXCustom. cpp. For more examples, see the file WebCore/bindings/js/JSXXXCustom. cpp.
- [JSCustomToNativeObject]For example, you can write your ownToDOMWindow (...):
PassRefPtr<DOMWindow> toDOMWindow(JSGlobalData& globalData, JSValue value) { ...; }
- [JSCustomFinalize]: Define Your 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 ownJSXXX: visitChildren (...)Function:
void JSXXX::visitChildren(JSCell* cell, SlotVisitor& visitor) { ...; }
- [JSCustomNamedGetterOnPrototype]: Define your ownJSXXXPrototype: putDelegate (...)Function:
bool JSXXXPrototype::putDelegate(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { ...; }
- [JSCustomPushEventHandlerScope]: Define your ownJSXXX: pushEventHandlerScope (...)Function:
ScopeChainNode* JSXXX::pushEventHandlerScope(ExecState* exec, ScopeChainNode* node) const { ...; }
- [JSCustomDefineOwnProperty]: Define your ownJSXXX: defineOwnProperty (...)Function:
bool JSXXX::defineOwnProperty(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor, bool throwException) { ...; }
- [JSCustomDefineOwnPropertyOnPrototype]: Define your own prototype attributesJSXXXPrototype: defineOwnProperty (...):
bool JSXXXPrototype::defineOwnProperty(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor, bool throwException) { ...; }
- [JSCustomGetOwnPropertySlotAndDescriptor]: Define your ownJSXXX: getOwnPropertySlotDelegate (...)AndJSXXX: getOwnPropertyDescriptorDelegate (...) Function:
bool JSXXX::getOwnPropertySlotDelegate(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) { ...; } bool JSXXX::getOwnPropertyDescriptorDelegate(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) { ...; }