一些特殊的Webkit Idl属性

Conditional=CONDITIONALNAME

Wraps the generated binding code in "#if ENABLE(CONDITIONALNAME)". Typically used to allow turning off features on certain platforms (or to disable new features while they are under development).
CustomMarkFunction
Adds a "virtual void mark()" declaration to the generated header file for the binding class. This allows a custom binding implementation to provide their own mark() function in WebCore/bindings/js/JSClassNameCustom.cpp for doing custom handling of garbage collection.
CustomToJS
不为绑定类产生 toJS()函数. 这允许实现者用自己的toJS()函数为给定的实现类创建正确的封装类. 当你的类有自己的继承关系,这就会有用:当给出一个基类的实例,自定义的toJS()实现返回派生类的封装,注意不是基类的封装。
DelegatingGetOwnPropertySlot
用于给某个类的实例定义自己的属性的查找方法. 例子就是HTML的 History对象,他需要限制某个属性是跨域可见(visible cross-domain),或者WorkerContext的例子,它想在自己的原型(protype)开始查找属性之前,把查找方法委托给全局对象.
ExtendsDOMGlobalObject
Does not expose the object prototype externally. Also uses a self-reference internally whenever it needs to access the JSDOMGlobalObject.
GenerateConstructor
产生使得类可以被外部实例化的代码
GenerateNativeConverter
Generates a helper function of the form ClassName* impl() { return static_cast<ClassName>(m_impl); }. Useful when working with a class hierarchy in the binding code, where the base m_impl member is defined to be the base type, not the appropriate derived type.
LegacyParent=ParentClass
Allows setting the base class for the generated binding. Otherwise, the base class would be set to DOMObject or the explicitly specified parent class in the interface definition.
NoStaticTables
Sharing a single static prototype table only works when a class is guaranteed to be accessed from a single heap, because the lookup code expects the key (attribute name) to have the same address across all instances of the object. For interfaces that are exposed to Workers, a single static table won‘t work because a given string used to look up a property on the object will lie at a different address in each heap.

See ?WebKitIDL for detailed documentation.

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。