Various custom interfaces of Webkit IDL and webkitidl

Source: Internet
Author: User

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)    {        ...;    }

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.