2012-03-30 21:42:20 -07:00
|
|
|
# DOM Bindings Configuration.
|
|
|
|
#
|
|
|
|
# The WebIDL interfaces are defined in dom/webidl. For each such interface, there
|
|
|
|
# is a corresponding entry in the configuration table below. The configuration
|
|
|
|
# table maps each interface name to a |descriptor| or list of |descriptor|s.
|
|
|
|
#
|
|
|
|
# Valid fields for all descriptors:
|
|
|
|
# * nativeType - The native type (concrete class or XPCOM interface) that
|
|
|
|
# instances of this interface will unwrap to (required).
|
|
|
|
# * headerFile - The file in which the nativeType is declared (defaults
|
|
|
|
# to an educated guess).
|
|
|
|
# * castable - Indicates whether the value in the wrapper can be cast to
|
|
|
|
# nativeType, or whether it needs to be QI-ed (defaults to True
|
|
|
|
# for everything but callback interfaces).
|
|
|
|
# * concrete - Indicates whether there exist objects with this interface as
|
|
|
|
# their primary interface (defaults to True).
|
|
|
|
# * prefable - Indicates whether this binding is subject to the about:config
|
|
|
|
# pref, or whether it's always enabled (defaults to False).
|
|
|
|
# * workers - Indicates whether the descriptor is intended to be used for
|
|
|
|
# worker threads (defaults to false).
|
|
|
|
# * customTrace - The native class will use a custom trace hook (defaults to
|
|
|
|
# true for workers, false otherwise).
|
|
|
|
# * customFinalize - The native class will use a custom finalize hook
|
|
|
|
# (defaults to true for workers, false otherwise).
|
|
|
|
# * notflattened - The native type does not have nsIClassInfo, so when
|
|
|
|
# wrapping it the right IID needs to be passed in.
|
|
|
|
#
|
|
|
|
# The following fields are either a string, an array (defaults to an empty
|
|
|
|
# array) or a dictionary with three possible keys (all, getterOnly and
|
|
|
|
# setterOnly) each having such an array as the value
|
|
|
|
#
|
|
|
|
# * infallible - attributes and methods specified in the .webidl file that
|
|
|
|
# cannot fail and therefore do not require the final nsresult&
|
|
|
|
# argument
|
|
|
|
# * implicitJSContext - attributes and methods specified in the .webidl file
|
|
|
|
# that require a JSContext as the first argument
|
|
|
|
# * resultNotAddRefed - attributes and methods specified in the .webidl file
|
|
|
|
# that do not AddRef the return value
|
|
|
|
|
|
|
|
DOMInterfaces = {
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'Blob': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsIDOMBlob',
|
|
|
|
'headerFile': 'nsIDOMFile.h',
|
2012-03-30 21:42:20 -07:00
|
|
|
'prefable': True,
|
2012-05-10 12:24:59 -07:00
|
|
|
'castable': False
|
2012-03-30 21:42:20 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'JSObject',
|
|
|
|
'headerFile': 'jsapi.h',
|
|
|
|
'castable': False
|
2012-03-30 21:42:20 -07:00
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'Document': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsIDocument',
|
|
|
|
'prefable': True,
|
|
|
|
'castable': False
|
2012-03-30 21:42:20 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'JSObject',
|
|
|
|
'headerFile': 'jsapi.h',
|
|
|
|
'castable': False
|
2012-03-30 21:42:20 -07:00
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'Event': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsIDOMEvent',
|
2012-03-30 21:42:20 -07:00
|
|
|
'prefable': True,
|
2012-05-10 12:24:59 -07:00
|
|
|
'castable': False
|
2012-03-30 21:42:20 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
'nativeType': 'JSObject',
|
|
|
|
'headerFile': 'jsapi.h',
|
|
|
|
'castable': False
|
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'EventListener': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsIDOMEventListener',
|
|
|
|
'prefable': True
|
2012-03-30 21:42:20 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
'nativeType': 'JSObject',
|
2012-05-10 12:24:59 -07:00
|
|
|
'headerFile': 'jsapi.h'
|
2012-03-30 21:42:20 -07:00
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'EventTarget': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsDOMEventTargetHelper',
|
|
|
|
'hasInstanceInterface': 'nsIDOMEventTarget',
|
|
|
|
'concrete': False,
|
2012-03-30 21:42:20 -07:00
|
|
|
'prefable': True,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'mozilla::dom::workers::EventTarget',
|
|
|
|
'headerFile': 'mozilla/dom/workers/bindings/EventTarget.h',
|
|
|
|
'concrete': False
|
2012-03-30 21:42:20 -07:00
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'FormData': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsIDOMFormData',
|
2012-03-30 21:42:20 -07:00
|
|
|
'prefable': True,
|
|
|
|
'castable': False
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
'nativeType': 'JSObject',
|
|
|
|
'headerFile': 'jsapi.h',
|
|
|
|
'castable': False
|
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'IID': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsIJSIID',
|
|
|
|
'headerFile': 'xpcjsid.h',
|
2012-03-30 21:42:20 -07:00
|
|
|
'prefable': True,
|
|
|
|
'castable': False
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
'nativeType': 'JSObject',
|
|
|
|
'headerFile': 'jsapi.h',
|
|
|
|
'castable': False
|
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'InputStream': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsIInputStream',
|
2012-03-30 21:42:20 -07:00
|
|
|
'prefable': True,
|
2012-05-10 12:24:59 -07:00
|
|
|
'castable': False,
|
|
|
|
'notflattened': True
|
2012-03-30 21:42:20 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'JSObject',
|
|
|
|
'headerFile': 'jsapi.h',
|
|
|
|
'castable': False
|
2012-03-30 21:42:20 -07:00
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'MozChannel': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsIChannel',
|
2012-03-30 21:42:20 -07:00
|
|
|
'prefable': True,
|
2012-05-10 12:24:59 -07:00
|
|
|
'castable': False,
|
|
|
|
'notflattened': True
|
2012-03-30 21:42:20 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
'nativeType': 'JSObject',
|
|
|
|
'headerFile': 'jsapi.h',
|
|
|
|
'castable': False
|
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'XMLHttpRequest': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsXMLHttpRequest',
|
|
|
|
'prefable': True,
|
|
|
|
'infallible': {
|
|
|
|
'all': [
|
|
|
|
'readyState', 'withCredentials', 'abort', 'statusText',
|
|
|
|
'getAllResponseHeaders', 'overrideMimeType', 'mozBackgroundRequest',
|
|
|
|
'multipart', 'channel', 'upload', 'status'
|
|
|
|
],
|
|
|
|
'getterOnly': [
|
|
|
|
'responseType', 'timeout', 'onreadystatechange'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
'implicitJSContext': {
|
|
|
|
'all': [
|
|
|
|
'response', 'getInterface', 'send', 'sendAsBinary'
|
|
|
|
],
|
|
|
|
'setterOnly': [
|
|
|
|
'onreadystatechange'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
'resultNotAddRefed': [ 'upload', 'responseXML' ]
|
2012-03-30 21:42:20 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'mozilla::dom::workers::XMLHttpRequest',
|
|
|
|
'headerFile': 'mozilla/dom/workers/bindings/XMLHttpRequest.h',
|
|
|
|
'infallible': {
|
|
|
|
'all': ['readyState', 'statusText' ],
|
|
|
|
'getterOnly': [ 'timeout', 'withCredentials', 'mozBackgroundRequest',
|
|
|
|
'responseType', 'responseXML', 'channel', 'multipart' ]
|
|
|
|
}
|
|
|
|
|
2012-03-30 21:42:20 -07:00
|
|
|
}],
|
|
|
|
|
|
|
|
'XMLHttpRequestEventTarget': [
|
|
|
|
{
|
|
|
|
'nativeType': 'nsXHREventTarget',
|
|
|
|
'headerFile': 'nsXMLHttpRequest.h',
|
|
|
|
'concrete': False,
|
|
|
|
'prefable': True,
|
|
|
|
'infallible': {
|
|
|
|
'getterOnly': [
|
|
|
|
'onabort', 'onerror', 'onload', 'onloadstart', 'onprogress',
|
|
|
|
'ontimeout', 'onloadend'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
'implicitJSContext': {
|
|
|
|
'setterOnly': [
|
|
|
|
'onabort', 'onerror', 'onload', 'onloadstart', 'onprogress',
|
|
|
|
'ontimeout', 'onloadend'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
|
|
|
'concrete': False,
|
|
|
|
'nativeType': 'mozilla::dom::workers::XMLHttpRequestEventTarget',
|
|
|
|
'headerFile': 'mozilla/dom/workers/bindings/XMLHttpRequestEventTarget.h'
|
|
|
|
}],
|
|
|
|
|
2012-05-10 12:24:59 -07:00
|
|
|
'XMLHttpRequestUpload': [
|
2012-03-30 21:42:20 -07:00
|
|
|
{
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'nsXMLHttpRequestUpload',
|
|
|
|
'headerFile': 'nsXMLHttpRequest.h',
|
|
|
|
'prefable': True
|
2012-03-30 21:42:20 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'workers': True,
|
2012-05-10 12:24:59 -07:00
|
|
|
'nativeType': 'mozilla::dom::workers::XMLHttpRequestUpload',
|
|
|
|
'headerFile': 'mozilla/dom/workers/bindings/XMLHttpRequestUpload.h'
|
2012-03-30 21:42:20 -07:00
|
|
|
}],
|
|
|
|
|
|
|
|
}
|