mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Auto merge of #12353 - Ms2ger:expose, r=jdm
Implement [Exposed]. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12353) <!-- Reviewable:end -->
This commit is contained in:
commit
6d59be17be
210 changed files with 374 additions and 249 deletions
|
@ -1817,20 +1817,25 @@ def DOMClassTypeId(desc):
|
||||||
|
|
||||||
|
|
||||||
def DOMClass(descriptor):
|
def DOMClass(descriptor):
|
||||||
protoList = ['PrototypeList::ID::' + proto for proto in descriptor.prototypeChain]
|
protoList = ['PrototypeList::ID::' + proto for proto in descriptor.prototypeChain]
|
||||||
# Pad out the list to the right length with ID::Last so we
|
# Pad out the list to the right length with ID::Last so we
|
||||||
# guarantee that all the lists are the same length. ID::Last
|
# guarantee that all the lists are the same length. ID::Last
|
||||||
# is never the ID of any prototype, so it's safe to use as
|
# is never the ID of any prototype, so it's safe to use as
|
||||||
# padding.
|
# padding.
|
||||||
protoList.extend(['PrototypeList::ID::Last'] * (descriptor.config.maxProtoChainLength - len(protoList)))
|
protoList.extend(['PrototypeList::ID::Last'] * (descriptor.config.maxProtoChainLength - len(protoList)))
|
||||||
prototypeChainString = ', '.join(protoList)
|
prototypeChainString = ', '.join(protoList)
|
||||||
heapSizeOf = 'heap_size_of_raw_self_and_children::<%s>' % descriptor.interface.identifier.name
|
heapSizeOf = 'heap_size_of_raw_self_and_children::<%s>' % descriptor.interface.identifier.name
|
||||||
return """\
|
if descriptor.isGlobal():
|
||||||
|
globals_ = camel_to_upper_snake(descriptor.name)
|
||||||
|
else:
|
||||||
|
globals_ = 'EMPTY'
|
||||||
|
return """\
|
||||||
DOMClass {
|
DOMClass {
|
||||||
interface_chain: [ %s ],
|
interface_chain: [ %s ],
|
||||||
type_id: %s,
|
type_id: %s,
|
||||||
heap_size_of: %s as unsafe fn(_) -> _,
|
heap_size_of: %s as unsafe fn(_) -> _,
|
||||||
}""" % (prototypeChainString, DOMClassTypeId(descriptor), heapSizeOf)
|
global: InterfaceObjectMap::%s,
|
||||||
|
}""" % (prototypeChainString, DOMClassTypeId(descriptor), heapSizeOf, globals_)
|
||||||
|
|
||||||
|
|
||||||
class CGDOMJSClass(CGThing):
|
class CGDOMJSClass(CGThing):
|
||||||
|
@ -2143,8 +2148,8 @@ class CGAbstractMethod(CGThing):
|
||||||
docs is None or documentation for the method in a string.
|
docs is None or documentation for the method in a string.
|
||||||
"""
|
"""
|
||||||
def __init__(self, descriptor, name, returnType, args, inline=False,
|
def __init__(self, descriptor, name, returnType, args, inline=False,
|
||||||
alwaysInline=False, extern=False, pub=False, templateArgs=None,
|
alwaysInline=False, extern=False, unsafe_fn=False, pub=False,
|
||||||
unsafe=False, docs=None, doesNotPanic=False):
|
templateArgs=None, unsafe=False, docs=None, doesNotPanic=False):
|
||||||
CGThing.__init__(self)
|
CGThing.__init__(self)
|
||||||
self.descriptor = descriptor
|
self.descriptor = descriptor
|
||||||
self.name = name
|
self.name = name
|
||||||
|
@ -2152,6 +2157,7 @@ class CGAbstractMethod(CGThing):
|
||||||
self.args = args
|
self.args = args
|
||||||
self.alwaysInline = alwaysInline
|
self.alwaysInline = alwaysInline
|
||||||
self.extern = extern
|
self.extern = extern
|
||||||
|
self.unsafe_fn = extern or unsafe_fn
|
||||||
self.templateArgs = templateArgs
|
self.templateArgs = templateArgs
|
||||||
self.pub = pub
|
self.pub = pub
|
||||||
self.unsafe = unsafe
|
self.unsafe = unsafe
|
||||||
|
@ -2178,13 +2184,15 @@ class CGAbstractMethod(CGThing):
|
||||||
if self.alwaysInline:
|
if self.alwaysInline:
|
||||||
decorators.append('#[inline]')
|
decorators.append('#[inline]')
|
||||||
|
|
||||||
if self.extern:
|
|
||||||
decorators.append('unsafe')
|
|
||||||
decorators.append('extern')
|
|
||||||
|
|
||||||
if self.pub:
|
if self.pub:
|
||||||
decorators.append('pub')
|
decorators.append('pub')
|
||||||
|
|
||||||
|
if self.unsafe_fn:
|
||||||
|
decorators.append('unsafe')
|
||||||
|
|
||||||
|
if self.extern:
|
||||||
|
decorators.append('extern')
|
||||||
|
|
||||||
if not decorators:
|
if not decorators:
|
||||||
return ''
|
return ''
|
||||||
return ' '.join(decorators) + ' '
|
return ' '.join(decorators) + ' '
|
||||||
|
@ -2230,45 +2238,37 @@ match result {
|
||||||
|
|
||||||
class CGConstructorEnabled(CGAbstractMethod):
|
class CGConstructorEnabled(CGAbstractMethod):
|
||||||
"""
|
"""
|
||||||
A method for testing whether we should be exposing this interface
|
A method for testing whether we should be exposing this interface object.
|
||||||
object or navigator property. This can perform various tests
|
This can perform various tests depending on what conditions are specified
|
||||||
depending on what conditions are specified on the interface.
|
on the interface.
|
||||||
"""
|
"""
|
||||||
def __init__(self, descriptor):
|
def __init__(self, descriptor):
|
||||||
CGAbstractMethod.__init__(self, descriptor,
|
CGAbstractMethod.__init__(self, descriptor,
|
||||||
'ConstructorEnabled', 'bool',
|
'ConstructorEnabled', 'bool',
|
||||||
[Argument("*mut JSContext", "aCx"),
|
[Argument("*mut JSContext", "aCx"),
|
||||||
Argument("HandleObject", "aObj")])
|
Argument("HandleObject", "aObj")],
|
||||||
|
unsafe_fn=True)
|
||||||
|
|
||||||
def definition_body(self):
|
def definition_body(self):
|
||||||
body = CGList([], "\n")
|
|
||||||
|
|
||||||
conditions = []
|
conditions = []
|
||||||
iface = self.descriptor.interface
|
iface = self.descriptor.interface
|
||||||
|
|
||||||
|
bits = " | ".join(sorted(
|
||||||
|
"InterfaceObjectMap::" + camel_to_upper_snake(i) for i in iface.exposureSet
|
||||||
|
))
|
||||||
|
conditions.append("is_exposed_in(aObj, %s)" % bits)
|
||||||
|
|
||||||
pref = iface.getExtendedAttribute("Pref")
|
pref = iface.getExtendedAttribute("Pref")
|
||||||
if pref:
|
if pref:
|
||||||
assert isinstance(pref, list) and len(pref) == 1
|
assert isinstance(pref, list) and len(pref) == 1
|
||||||
conditions.append('PREFS.get("%s").as_boolean().unwrap_or(false)' % pref[0])
|
conditions.append('PREFS.get("%s").as_boolean().unwrap_or(false)' % pref[0])
|
||||||
|
|
||||||
func = iface.getExtendedAttribute("Func")
|
func = iface.getExtendedAttribute("Func")
|
||||||
if func:
|
if func:
|
||||||
assert isinstance(func, list) and len(func) == 1
|
assert isinstance(func, list) and len(func) == 1
|
||||||
conditions.append("%s(aCx, aObj)" % func[0])
|
conditions.append("%s(aCx, aObj)" % func[0])
|
||||||
# We should really have some conditions
|
|
||||||
assert len(body) or len(conditions)
|
|
||||||
|
|
||||||
conditionsWrapper = ""
|
return CGList((CGGeneric(cond) for cond in conditions), " &&\n")
|
||||||
if len(conditions):
|
|
||||||
conditionsWrapper = CGWrapper(CGList((CGGeneric(cond) for cond in conditions),
|
|
||||||
" &&\n"),
|
|
||||||
pre="return ",
|
|
||||||
post=";\n",
|
|
||||||
reindent=True)
|
|
||||||
else:
|
|
||||||
conditionsWrapper = CGGeneric("return true;\n")
|
|
||||||
|
|
||||||
body.append(conditionsWrapper)
|
|
||||||
return body
|
|
||||||
|
|
||||||
|
|
||||||
def CreateBindingJSObject(descriptor, parent=None):
|
def CreateBindingJSObject(descriptor, parent=None):
|
||||||
|
@ -2806,27 +2806,27 @@ class CGDefineDOMInterfaceMethod(CGAbstractMethod):
|
||||||
Argument('*mut JSContext', 'cx'),
|
Argument('*mut JSContext', 'cx'),
|
||||||
Argument('HandleObject', 'global'),
|
Argument('HandleObject', 'global'),
|
||||||
]
|
]
|
||||||
CGAbstractMethod.__init__(self, descriptor, 'DefineDOMInterface', 'void', args, pub=True)
|
CGAbstractMethod.__init__(self, descriptor, 'DefineDOMInterface',
|
||||||
|
'void', args, pub=True, unsafe_fn=True)
|
||||||
|
|
||||||
def define(self):
|
def define(self):
|
||||||
return CGAbstractMethod.define(self)
|
return CGAbstractMethod.define(self)
|
||||||
|
|
||||||
def definition_body(self):
|
def definition_body(self):
|
||||||
def getCheck(desc):
|
|
||||||
if not desc.isExposedConditionally():
|
|
||||||
return ""
|
|
||||||
else:
|
|
||||||
return "if !ConstructorEnabled(cx, global) { return; }"
|
|
||||||
if self.descriptor.interface.isCallback():
|
if self.descriptor.interface.isCallback():
|
||||||
function = "GetConstructorObject"
|
function = "GetConstructorObject"
|
||||||
else:
|
else:
|
||||||
function = "GetProtoObject"
|
function = "GetProtoObject"
|
||||||
return CGGeneric("""\
|
return CGGeneric("""\
|
||||||
assert!(!global.get().is_null());
|
assert!(!global.get().is_null());
|
||||||
%s
|
|
||||||
|
if !ConstructorEnabled(cx, global) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
rooted!(in(cx) let mut proto = ptr::null_mut());
|
rooted!(in(cx) let mut proto = ptr::null_mut());
|
||||||
%s(cx, global, proto.handle_mut());
|
%s(cx, global, proto.handle_mut());
|
||||||
assert!(!proto.is_null());""" % (getCheck(self.descriptor), function))
|
assert!(!proto.is_null());""" % (function,))
|
||||||
|
|
||||||
|
|
||||||
def needCx(returnType, arguments, considerTypes):
|
def needCx(returnType, arguments, considerTypes):
|
||||||
|
@ -5140,8 +5140,7 @@ class CGDescriptor(CGThing):
|
||||||
|
|
||||||
if descriptor.interface.hasInterfaceObject():
|
if descriptor.interface.hasInterfaceObject():
|
||||||
cgThings.append(CGDefineDOMInterfaceMethod(descriptor))
|
cgThings.append(CGDefineDOMInterfaceMethod(descriptor))
|
||||||
if descriptor.isExposedConditionally():
|
cgThings.append(CGConstructorEnabled(descriptor))
|
||||||
cgThings.append(CGConstructorEnabled(descriptor))
|
|
||||||
|
|
||||||
if descriptor.proxy:
|
if descriptor.proxy:
|
||||||
cgThings.append(CGDefineProxyHandler(descriptor))
|
cgThings.append(CGDefineProxyHandler(descriptor))
|
||||||
|
@ -5562,6 +5561,7 @@ class CGBindingRoot(CGThing):
|
||||||
'js::glue::AppendToAutoIdVector',
|
'js::glue::AppendToAutoIdVector',
|
||||||
'js::rust::{GCMethods, define_methods, define_properties}',
|
'js::rust::{GCMethods, define_methods, define_properties}',
|
||||||
'dom::bindings',
|
'dom::bindings',
|
||||||
|
'dom::bindings::codegen::InterfaceObjectMap',
|
||||||
'dom::bindings::global::{GlobalRef, global_root_from_object, global_root_from_reflector}',
|
'dom::bindings::global::{GlobalRef, global_root_from_object, global_root_from_reflector}',
|
||||||
'dom::bindings::interface::{InterfaceConstructorBehavior, NonCallbackInterfaceObjectClass}',
|
'dom::bindings::interface::{InterfaceConstructorBehavior, NonCallbackInterfaceObjectClass}',
|
||||||
'dom::bindings::interface::{create_callback_interface_object, create_interface_prototype_object}',
|
'dom::bindings::interface::{create_callback_interface_object, create_interface_prototype_object}',
|
||||||
|
@ -5569,6 +5569,7 @@ class CGBindingRoot(CGThing):
|
||||||
'dom::bindings::interface::{define_guarded_methods, define_guarded_properties}',
|
'dom::bindings::interface::{define_guarded_methods, define_guarded_properties}',
|
||||||
'dom::bindings::interface::{ConstantSpec, NonNullJSNative}',
|
'dom::bindings::interface::{ConstantSpec, NonNullJSNative}',
|
||||||
'dom::bindings::interface::ConstantVal::{IntVal, UintVal}',
|
'dom::bindings::interface::ConstantVal::{IntVal, UintVal}',
|
||||||
|
'dom::bindings::interface::is_exposed_in',
|
||||||
'dom::bindings::js::{JS, Root, RootedReference}',
|
'dom::bindings::js::{JS, Root, RootedReference}',
|
||||||
'dom::bindings::js::{OptionalRootedReference}',
|
'dom::bindings::js::{OptionalRootedReference}',
|
||||||
'dom::bindings::reflector::{Reflectable}',
|
'dom::bindings::reflector::{Reflectable}',
|
||||||
|
@ -6222,6 +6223,10 @@ class CallbackSetter(CallbackMember):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def camel_to_upper_snake(s):
|
||||||
|
return "_".join(m.group(0).upper() for m in re.finditer("[A-Z][a-z]*", s))
|
||||||
|
|
||||||
|
|
||||||
class GlobalGenRoots():
|
class GlobalGenRoots():
|
||||||
"""
|
"""
|
||||||
Roots for global codegen.
|
Roots for global codegen.
|
||||||
|
@ -6239,6 +6244,18 @@ class GlobalGenRoots():
|
||||||
]
|
]
|
||||||
imports = CGList([CGGeneric("use %s;" % mod) for mod in mods], "\n")
|
imports = CGList([CGGeneric("use %s;" % mod) for mod in mods], "\n")
|
||||||
|
|
||||||
|
global_descriptors = config.getDescriptors(isGlobal=True)
|
||||||
|
flags = [("EMPTY", 0)]
|
||||||
|
flags.extend(
|
||||||
|
(camel_to_upper_snake(d.name), 2 ** idx)
|
||||||
|
for (idx, d) in enumerate(global_descriptors)
|
||||||
|
)
|
||||||
|
global_flags = CGWrapper(CGIndenter(CGList([
|
||||||
|
CGGeneric("const %s = %#x," % args)
|
||||||
|
for args in flags
|
||||||
|
], "\n")), pre="pub flags Globals: u8 {\n", post="\n}")
|
||||||
|
globals_ = CGWrapper(CGIndenter(global_flags), pre="bitflags! {\n", post="\n}")
|
||||||
|
|
||||||
pairs = []
|
pairs = []
|
||||||
for d in config.getDescriptors(hasInterfaceObject=True):
|
for d in config.getDescriptors(hasInterfaceObject=True):
|
||||||
binding = toBindingNamespace(d.name)
|
binding = toBindingNamespace(d.name)
|
||||||
|
@ -6247,10 +6264,10 @@ class GlobalGenRoots():
|
||||||
pairs.append((ctor.identifier.name, binding))
|
pairs.append((ctor.identifier.name, binding))
|
||||||
pairs.sort(key=operator.itemgetter(0))
|
pairs.sort(key=operator.itemgetter(0))
|
||||||
mappings = [
|
mappings = [
|
||||||
CGGeneric('b"%s" => codegen::Bindings::%s::DefineDOMInterface as fn(_, _),' % pair)
|
CGGeneric('b"%s" => codegen::Bindings::%s::DefineDOMInterface as unsafe fn(_, _),' % pair)
|
||||||
for pair in pairs
|
for pair in pairs
|
||||||
]
|
]
|
||||||
mapType = "phf::Map<&'static [u8], fn(*mut JSContext, HandleObject)>"
|
mapType = "phf::Map<&'static [u8], unsafe fn(*mut JSContext, HandleObject)>"
|
||||||
phf = CGWrapper(
|
phf = CGWrapper(
|
||||||
CGIndenter(CGList(mappings, "\n")),
|
CGIndenter(CGList(mappings, "\n")),
|
||||||
pre="pub static MAP: %s = phf_map! {\n" % mapType,
|
pre="pub static MAP: %s = phf_map! {\n" % mapType,
|
||||||
|
@ -6258,7 +6275,7 @@ class GlobalGenRoots():
|
||||||
|
|
||||||
return CGList([
|
return CGList([
|
||||||
CGGeneric(AUTOGENERATED_WARNING_COMMENT),
|
CGGeneric(AUTOGENERATED_WARNING_COMMENT),
|
||||||
CGList([imports, phf], "\n\n")
|
CGList([imports, globals_, phf], "\n\n")
|
||||||
])
|
])
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
@ -85,6 +85,8 @@ class Configuration:
|
||||||
getter = lambda x: x.interface.isCallback()
|
getter = lambda x: x.interface.isCallback()
|
||||||
elif key == 'isJSImplemented':
|
elif key == 'isJSImplemented':
|
||||||
getter = lambda x: x.interface.isJSImplemented()
|
getter = lambda x: x.interface.isJSImplemented()
|
||||||
|
elif key == 'isGlobal':
|
||||||
|
getter = lambda x: x.isGlobal()
|
||||||
else:
|
else:
|
||||||
getter = lambda x: getattr(x, key)
|
getter = lambda x: getattr(x, key)
|
||||||
curr = filter(lambda x: getter(x) == val, curr)
|
curr = filter(lambda x: getter(x) == val, curr)
|
||||||
|
@ -367,8 +369,8 @@ class Descriptor(DescriptorProvider):
|
||||||
Returns true if this is the primary interface for a global object
|
Returns true if this is the primary interface for a global object
|
||||||
of some sort.
|
of some sort.
|
||||||
"""
|
"""
|
||||||
return (self.interface.getExtendedAttribute("Global") or
|
return bool(self.interface.getExtendedAttribute("Global") or
|
||||||
self.interface.getExtendedAttribute("PrimaryGlobal"))
|
self.interface.getExtendedAttribute("PrimaryGlobal"))
|
||||||
|
|
||||||
|
|
||||||
# Some utility methods
|
# Some utility methods
|
||||||
|
|
|
@ -1239,12 +1239,6 @@ class IDLInterface(IDLObjectWithScope, IDLExposureMixins):
|
||||||
alias,
|
alias,
|
||||||
[member.location, m.location])
|
[member.location, m.location])
|
||||||
|
|
||||||
if (self.getExtendedAttribute("Pref") and
|
|
||||||
self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])):
|
|
||||||
raise WebIDLError("[Pref] used on an interface that is not %s-only" %
|
|
||||||
self.parentScope.primaryGlobalName,
|
|
||||||
[self.location])
|
|
||||||
|
|
||||||
for attribute in ["CheckAnyPermissions", "CheckAllPermissions"]:
|
for attribute in ["CheckAnyPermissions", "CheckAllPermissions"]:
|
||||||
if (self.getExtendedAttribute(attribute) and
|
if (self.getExtendedAttribute(attribute) and
|
||||||
self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])):
|
self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])):
|
||||||
|
@ -3459,12 +3453,6 @@ class IDLInterfaceMember(IDLObjectWithIdentifier, IDLExposureMixins):
|
||||||
IDLExposureMixins.finish(self, scope)
|
IDLExposureMixins.finish(self, scope)
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
if (self.getExtendedAttribute("Pref") and
|
|
||||||
self.exposureSet != set([self._globalScope.primaryGlobalName])):
|
|
||||||
raise WebIDLError("[Pref] used on an interface member that is not "
|
|
||||||
"%s-only" % self._globalScope.primaryGlobalName,
|
|
||||||
[self.location])
|
|
||||||
|
|
||||||
for attribute in ["CheckAnyPermissions", "CheckAllPermissions"]:
|
for attribute in ["CheckAnyPermissions", "CheckAllPermissions"]:
|
||||||
if (self.getExtendedAttribute(attribute) and
|
if (self.getExtendedAttribute(attribute) and
|
||||||
self.exposureSet != set([self._globalScope.primaryGlobalName])):
|
self.exposureSet != set([self._globalScope.primaryGlobalName])):
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
--- WebIDL.py
|
||||||
|
+++ WebIDL.py
|
||||||
|
@@ -1239,12 +1239,6 @@ class IDLInterface(IDLObjectWithScope, IDLExposureMixins):
|
||||||
|
alias,
|
||||||
|
[member.location, m.location])
|
||||||
|
|
||||||
|
- if (self.getExtendedAttribute("Pref") and
|
||||||
|
- self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])):
|
||||||
|
- raise WebIDLError("[Pref] used on an interface that is not %s-only" %
|
||||||
|
- self.parentScope.primaryGlobalName,
|
||||||
|
- [self.location])
|
||||||
|
-
|
||||||
|
for attribute in ["CheckAnyPermissions", "CheckAllPermissions"]:
|
||||||
|
if (self.getExtendedAttribute(attribute) and
|
||||||
|
self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])):
|
||||||
|
@@ -3459,12 +3453,6 @@ class IDLInterfaceMember(IDLObjectWithIdentifier, IDLExposureMixins):
|
||||||
|
IDLExposureMixins.finish(self, scope)
|
||||||
|
|
||||||
|
def validate(self):
|
||||||
|
- if (self.getExtendedAttribute("Pref") and
|
||||||
|
- self.exposureSet != set([self._globalScope.primaryGlobalName])):
|
||||||
|
- raise WebIDLError("[Pref] used on an interface member that is not "
|
||||||
|
- "%s-only" % self._globalScope.primaryGlobalName,
|
||||||
|
- [self.location])
|
||||||
|
-
|
||||||
|
for attribute in ["CheckAnyPermissions", "CheckAllPermissions"]:
|
||||||
|
if (self.getExtendedAttribute(attribute) and
|
||||||
|
self.exposureSet != set([self._globalScope.primaryGlobalName])):
|
|
@ -1,6 +1,7 @@
|
||||||
wget https://mxr.mozilla.org/mozilla-central/source/dom/bindings/parser/WebIDL.py?raw=1 -O WebIDL.py
|
wget https://mxr.mozilla.org/mozilla-central/source/dom/bindings/parser/WebIDL.py?raw=1 -O WebIDL.py
|
||||||
patch < abstract.patch
|
patch < abstract.patch
|
||||||
patch < debug.patch
|
patch < debug.patch
|
||||||
|
patch < pref-main-thread.patch
|
||||||
|
|
||||||
wget https://hg.mozilla.org/mozilla-central/archive/tip.tar.gz/dom/bindings/parser/tests/ -O tests.tar.gz
|
wget https://hg.mozilla.org/mozilla-central/archive/tip.tar.gz/dom/bindings/parser/tests/ -O tests.tar.gz
|
||||||
rm -r tests
|
rm -r tests
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
//! Machinery to initialise interface prototype objects and interface objects.
|
//! Machinery to initialise interface prototype objects and interface objects.
|
||||||
|
|
||||||
|
use dom::bindings::codegen::InterfaceObjectMap::Globals;
|
||||||
use dom::bindings::codegen::PrototypeList;
|
use dom::bindings::codegen::PrototypeList;
|
||||||
use dom::bindings::conversions::get_dom_class;
|
use dom::bindings::conversions::get_dom_class;
|
||||||
use dom::bindings::guard::Guard;
|
use dom::bindings::guard::Guard;
|
||||||
|
@ -484,3 +485,11 @@ unsafe extern "C" fn non_new_constructor(
|
||||||
throw_type_error(cx, "This constructor needs to be called with `new`.");
|
throw_type_error(cx, "This constructor needs to be called with `new`.");
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns whether an interface with exposure set given by `globals` should
|
||||||
|
/// be exposed in the global object `obj`.
|
||||||
|
pub unsafe fn is_exposed_in(object: HandleObject, globals: Globals) -> bool {
|
||||||
|
let unwrapped = UncheckedUnwrapObject(object.get(), /* stopAtWindowProxy = */ 0);
|
||||||
|
let dom_class = get_dom_class(unwrapped).unwrap();
|
||||||
|
globals.contains(dom_class.global)
|
||||||
|
}
|
||||||
|
|
|
@ -93,6 +93,9 @@ pub struct DOMClass {
|
||||||
|
|
||||||
/// The HeapSizeOf function wrapper for that interface.
|
/// The HeapSizeOf function wrapper for that interface.
|
||||||
pub heap_size_of: unsafe fn(*const c_void) -> usize,
|
pub heap_size_of: unsafe fn(*const c_void) -> usize,
|
||||||
|
|
||||||
|
/// The `Globals` flag for this global interface, if any.
|
||||||
|
pub global: InterfaceObjectMap::Globals,
|
||||||
}
|
}
|
||||||
unsafe impl Sync for DOMClass {}
|
unsafe impl Sync for DOMClass {}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface Attr {
|
interface Attr {
|
||||||
[Constant]
|
[Constant]
|
||||||
readonly attribute DOMString? namespaceURI;
|
readonly attribute DOMString? namespaceURI;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
* https://html.spec.whatwg.org/multipage/#beforeunloadevent
|
* https://html.spec.whatwg.org/multipage/#beforeunloadevent
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface BeforeUnloadEvent : Event {
|
interface BeforeUnloadEvent : Event {
|
||||||
attribute DOMString returnValue;
|
attribute DOMString returnValue;
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
[Constructor(optional sequence<BlobPart> blobParts,
|
[Constructor(optional sequence<BlobPart> blobParts,
|
||||||
optional BlobPropertyBag options),
|
optional BlobPropertyBag options),
|
||||||
Exposed=Window/*,Worker*/]
|
Exposed=(Window,Worker)]
|
||||||
interface Blob {
|
interface Blob {
|
||||||
|
|
||||||
readonly attribute unsigned long long size;
|
readonly attribute unsigned long long size;
|
||||||
|
|
|
@ -15,7 +15,7 @@ dictionary RequestDeviceOptions {
|
||||||
sequence<BluetoothServiceUUID> optionalServices /*= []*/;
|
sequence<BluetoothServiceUUID> optionalServices /*= []*/;
|
||||||
};
|
};
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Pref="dom.bluetooth.enabled", Exposed=(Window,Worker)]
|
||||||
interface Bluetooth {
|
interface Bluetooth {
|
||||||
// Promise<BluetoothDevice> requestDevice(RequestDeviceOptions options);
|
// Promise<BluetoothDevice> requestDevice(RequestDeviceOptions options);
|
||||||
[Throws]
|
[Throws]
|
||||||
|
|
|
@ -12,7 +12,7 @@ interface BluetoothServiceDataMap {
|
||||||
readonly maplike<UUID, DataView>;
|
readonly maplike<UUID, DataView>;
|
||||||
};*/
|
};*/
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Pref="dom.bluetooth.enabled", Exposed=(Window,Worker)]
|
||||||
interface BluetoothAdvertisingData {
|
interface BluetoothAdvertisingData {
|
||||||
readonly attribute unsigned short? appearance;
|
readonly attribute unsigned short? appearance;
|
||||||
readonly attribute byte? txPower;
|
readonly attribute byte? txPower;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// https://webbluetoothcg.github.io/web-bluetooth/#characteristicproperties
|
// https://webbluetoothcg.github.io/web-bluetooth/#characteristicproperties
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Pref="dom.bluetooth.enabled", Exposed=(Window,Worker)]
|
||||||
interface BluetoothCharacteristicProperties {
|
interface BluetoothCharacteristicProperties {
|
||||||
readonly attribute boolean broadcast;
|
readonly attribute boolean broadcast;
|
||||||
readonly attribute boolean read;
|
readonly attribute boolean read;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothdevice
|
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothdevice
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Pref="dom.bluetooth.enabled", Exposed=(Window,Worker)]
|
||||||
interface BluetoothDevice {
|
interface BluetoothDevice {
|
||||||
readonly attribute DOMString id;
|
readonly attribute DOMString id;
|
||||||
readonly attribute DOMString? name;
|
readonly attribute DOMString? name;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattcharacteristic
|
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattcharacteristic
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Pref="dom.bluetooth.enabled", Exposed=(Window,Worker)]
|
||||||
interface BluetoothRemoteGATTCharacteristic {
|
interface BluetoothRemoteGATTCharacteristic {
|
||||||
readonly attribute BluetoothRemoteGATTService service;
|
readonly attribute BluetoothRemoteGATTService service;
|
||||||
readonly attribute DOMString uuid;
|
readonly attribute DOMString uuid;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// http://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattdescriptor
|
// http://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattdescriptor
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Pref="dom.bluetooth.enabled", Exposed=(Window,Worker)]
|
||||||
interface BluetoothRemoteGATTDescriptor {
|
interface BluetoothRemoteGATTDescriptor {
|
||||||
readonly attribute BluetoothRemoteGATTCharacteristic characteristic;
|
readonly attribute BluetoothRemoteGATTCharacteristic characteristic;
|
||||||
readonly attribute DOMString uuid;
|
readonly attribute DOMString uuid;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
//https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattserver
|
//https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattserver
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Pref="dom.bluetooth.enabled", Exposed=(Window,Worker)]
|
||||||
interface BluetoothRemoteGATTServer {
|
interface BluetoothRemoteGATTServer {
|
||||||
readonly attribute BluetoothDevice device;
|
readonly attribute BluetoothDevice device;
|
||||||
readonly attribute boolean connected;
|
readonly attribute boolean connected;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattservice
|
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattservice
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Pref="dom.bluetooth.enabled", Exposed=(Window,Worker)]
|
||||||
interface BluetoothRemoteGATTService {
|
interface BluetoothRemoteGATTService {
|
||||||
readonly attribute BluetoothDevice device;
|
readonly attribute BluetoothDevice device;
|
||||||
readonly attribute DOMString uuid;
|
readonly attribute DOMString uuid;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothuuid
|
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothuuid
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Pref="dom.bluetooth.enabled", Exposed=(Window,Worker)]
|
||||||
interface BluetoothUUID {
|
interface BluetoothUUID {
|
||||||
[Throws]
|
[Throws]
|
||||||
static UUID getService(BluetoothServiceUUID name);
|
static UUID getService(BluetoothServiceUUID name);
|
||||||
|
|
|
@ -19,7 +19,7 @@ callback BrowserElementNextPaintEventCallback = void ();
|
||||||
// DOMString? origin;
|
// DOMString? origin;
|
||||||
//};
|
//};
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface BrowserElement {
|
interface BrowserElement {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -104,44 +104,37 @@ dictionary BrowserElementVisibilityChangeEventDetail {
|
||||||
BrowserElement implements BrowserElementCommon;
|
BrowserElement implements BrowserElementCommon;
|
||||||
BrowserElement implements BrowserElementPrivileged;
|
BrowserElement implements BrowserElementPrivileged;
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface BrowserElementCommon {
|
interface BrowserElementCommon {
|
||||||
[Throws,
|
[Throws,
|
||||||
Pref="dom.mozbrowser.enabled",
|
Pref="dom.mozbrowser.enabled"]
|
||||||
CheckAnyPermissions="browser embed-widgets"]
|
|
||||||
void setVisible(boolean visible);
|
void setVisible(boolean visible);
|
||||||
|
|
||||||
[Throws,
|
[Throws,
|
||||||
Pref="dom.mozbrowser.enabled",
|
Pref="dom.mozbrowser.enabled"]
|
||||||
CheckAnyPermissions="browser embed-widgets"]
|
|
||||||
boolean getVisible();
|
boolean getVisible();
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAnyPermissions="browser embed-widgets"]
|
|
||||||
//void setActive(boolean active);
|
//void setActive(boolean active);
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAnyPermissions="browser embed-widgets"]
|
|
||||||
//boolean getActive();
|
//boolean getActive();
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAnyPermissions="browser embed-widgets"]
|
|
||||||
//void addNextPaintListener(BrowserElementNextPaintEventCallback listener);
|
//void addNextPaintListener(BrowserElementNextPaintEventCallback listener);
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAnyPermissions="browser embed-widgets"]
|
|
||||||
//void removeNextPaintListener(BrowserElementNextPaintEventCallback listener);
|
//void removeNextPaintListener(BrowserElementNextPaintEventCallback listener);
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface BrowserElementPrivileged {
|
interface BrowserElementPrivileged {
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAnyPermissions="browser"]
|
|
||||||
//void sendMouseEvent(DOMString type,
|
//void sendMouseEvent(DOMString type,
|
||||||
// unsigned long x,
|
// unsigned long x,
|
||||||
// unsigned long y,
|
// unsigned long y,
|
||||||
|
@ -151,8 +144,7 @@ interface BrowserElementPrivileged {
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled",
|
||||||
// Func="TouchEvent::PrefEnabled",
|
// Func="TouchEvent::PrefEnabled"]
|
||||||
// CheckAnyPermissions="browser"]
|
|
||||||
//void sendTouchEvent(DOMString type,
|
//void sendTouchEvent(DOMString type,
|
||||||
// sequence<unsigned long> identifiers,
|
// sequence<unsigned long> identifiers,
|
||||||
// sequence<long> x,
|
// sequence<long> x,
|
||||||
|
@ -177,71 +169,58 @@ interface BrowserElementPrivileged {
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAnyPermissions="browser"]
|
|
||||||
//DOMRequest download(DOMString url,
|
//DOMRequest download(DOMString url,
|
||||||
// optional BrowserElementDownloadOptions options);
|
// optional BrowserElementDownloadOptions options);
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAnyPermissions="browser"]
|
|
||||||
//DOMRequest purgeHistory();
|
//DOMRequest purgeHistory();
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAnyPermissions="browser"]
|
|
||||||
//DOMRequest getScreenshot([EnforceRange] unsigned long width,
|
//DOMRequest getScreenshot([EnforceRange] unsigned long width,
|
||||||
// [EnforceRange] unsigned long height,
|
// [EnforceRange] unsigned long height,
|
||||||
// optional DOMString mimeType="");
|
// optional DOMString mimeType="");
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAnyPermissions="browser"]
|
|
||||||
//void zoom(float zoom);
|
//void zoom(float zoom);
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAnyPermissions="browser"]
|
|
||||||
//DOMRequest getCanGoBack();
|
//DOMRequest getCanGoBack();
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAnyPermissions="browser"]
|
|
||||||
//DOMRequest getCanGoForward();
|
//DOMRequest getCanGoForward();
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAnyPermissions="browser"]
|
|
||||||
//DOMRequest getContentDimensions();
|
//DOMRequest getContentDimensions();
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAllPermissions="browser input-manage"]
|
|
||||||
//DOMRequest setInputMethodActive(boolean isActive);
|
//DOMRequest setInputMethodActive(boolean isActive);
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAllPermissions="browser nfc-manager"]
|
|
||||||
//void setNFCFocus(boolean isFocus);
|
//void setNFCFocus(boolean isFocus);
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAnyPermissions="browser"]
|
|
||||||
//void findAll(DOMString searchString, BrowserFindCaseSensitivity caseSensitivity);
|
//void findAll(DOMString searchString, BrowserFindCaseSensitivity caseSensitivity);
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAnyPermissions="browser"]
|
|
||||||
//void findNext(BrowserFindDirection direction);
|
//void findNext(BrowserFindDirection direction);
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAnyPermissions="browser"]
|
|
||||||
//void clearMatch();
|
//void clearMatch();
|
||||||
|
|
||||||
//[Throws,
|
//[Throws,
|
||||||
// Pref="dom.mozBrowserFramesEnabled",
|
// Pref="dom.mozBrowserFramesEnabled"]
|
||||||
// CheckAllPermissions="browser browser:universalxss"]
|
|
||||||
//DOMRequest executeScript(DOMString script,
|
//DOMRequest executeScript(DOMString script,
|
||||||
// optional BrowserElementExecuteScriptOptions options);
|
// optional BrowserElementExecuteScriptOptions options);
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* http://dev.w3.org/csswg/cssom/#the-css-interface
|
* http://dev.w3.org/csswg/cssom/#the-css-interface
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Abstract]
|
[Abstract, Exposed=(Window,Worker)]
|
||||||
interface CSS {
|
interface CSS {
|
||||||
[Throws]
|
[Throws]
|
||||||
static DOMString escape(DOMString ident);
|
static DOMString escape(DOMString ident);
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
* Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
|
* Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface CSSStyleDeclaration {
|
interface CSSStyleDeclaration {
|
||||||
[SetterThrows]
|
[SetterThrows]
|
||||||
attribute DOMString cssText;
|
attribute DOMString cssText;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#canvasgradient
|
// https://html.spec.whatwg.org/multipage/#canvasgradient
|
||||||
// [Exposed=(Window,Worker)]
|
[Exposed=(Window,Worker)]
|
||||||
interface CanvasGradient {
|
interface CanvasGradient {
|
||||||
// opaque object
|
// opaque object
|
||||||
[Throws]
|
[Throws]
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#canvaspattern
|
// https://html.spec.whatwg.org/multipage/#canvaspattern
|
||||||
|
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface CanvasPattern {
|
interface CanvasPattern {
|
||||||
//void setTransform(SVGMatrix matrix);
|
//void setTransform(SVGMatrix matrix);
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,7 +11,8 @@ typedef (HTMLImageElement or
|
||||||
CanvasRenderingContext2D /* or
|
CanvasRenderingContext2D /* or
|
||||||
ImageBitmap */) CanvasImageSource;
|
ImageBitmap */) CanvasImageSource;
|
||||||
|
|
||||||
//[Constructor(optional unsigned long width, unsigned long height), Exposed=Window,Worker]
|
//[Constructor(optional unsigned long width, unsigned long height)]
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface CanvasRenderingContext2D {
|
interface CanvasRenderingContext2D {
|
||||||
|
|
||||||
// back-reference to the canvas
|
// back-reference to the canvas
|
||||||
|
@ -41,14 +42,14 @@ CanvasRenderingContext2D implements CanvasPathDrawingStyles;
|
||||||
CanvasRenderingContext2D implements CanvasTextDrawingStyles;
|
CanvasRenderingContext2D implements CanvasTextDrawingStyles;
|
||||||
CanvasRenderingContext2D implements CanvasPath;
|
CanvasRenderingContext2D implements CanvasPath;
|
||||||
|
|
||||||
[NoInterfaceObject]//,Exposed=(Window,Worker)]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasState {
|
interface CanvasState {
|
||||||
// state
|
// state
|
||||||
void save(); // push state on state stack
|
void save(); // push state on state stack
|
||||||
void restore(); // pop state stack and restore state
|
void restore(); // pop state stack and restore state
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]//,Exposed=(Window,Worker)]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasTransform {
|
interface CanvasTransform {
|
||||||
// transformations (default transform is the identity matrix)
|
// transformations (default transform is the identity matrix)
|
||||||
void scale(unrestricted double x, unrestricted double y);
|
void scale(unrestricted double x, unrestricted double y);
|
||||||
|
@ -72,21 +73,21 @@ interface CanvasTransform {
|
||||||
void resetTransform();
|
void resetTransform();
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]//,Exposed=(Window,Worker)]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasCompositing {
|
interface CanvasCompositing {
|
||||||
// compositing
|
// compositing
|
||||||
attribute unrestricted double globalAlpha; // (default 1.0)
|
attribute unrestricted double globalAlpha; // (default 1.0)
|
||||||
attribute DOMString globalCompositeOperation; // (default source-over)
|
attribute DOMString globalCompositeOperation; // (default source-over)
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]//,Exposed=(Window,Worker)]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasImageSmoothing {
|
interface CanvasImageSmoothing {
|
||||||
// image smoothing
|
// image smoothing
|
||||||
attribute boolean imageSmoothingEnabled; // (default true)
|
attribute boolean imageSmoothingEnabled; // (default true)
|
||||||
// attribute ImageSmoothingQuality imageSmoothingQuality; // (default low)
|
// attribute ImageSmoothingQuality imageSmoothingQuality; // (default low)
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]//,Exposed=(Window,Worker)]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasFillStrokeStyles {
|
interface CanvasFillStrokeStyles {
|
||||||
|
|
||||||
// colours and styles (see also the CanvasDrawingStyles interface)
|
// colours and styles (see also the CanvasDrawingStyles interface)
|
||||||
|
@ -99,7 +100,7 @@ interface CanvasFillStrokeStyles {
|
||||||
CanvasPattern createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition);
|
CanvasPattern createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition);
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]//,Exposed=(Window,Worker)]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasShadowStyles {
|
interface CanvasShadowStyles {
|
||||||
// shadows
|
// shadows
|
||||||
attribute unrestricted double shadowOffsetX; // (default 0)
|
attribute unrestricted double shadowOffsetX; // (default 0)
|
||||||
|
@ -108,7 +109,7 @@ interface CanvasShadowStyles {
|
||||||
attribute DOMString shadowColor; // (default transparent black)
|
attribute DOMString shadowColor; // (default transparent black)
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]//,Exposed=(Window,Worker)]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasRect {
|
interface CanvasRect {
|
||||||
// rects
|
// rects
|
||||||
//[LenientFloat]
|
//[LenientFloat]
|
||||||
|
@ -119,7 +120,7 @@ interface CanvasRect {
|
||||||
void strokeRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
|
void strokeRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h);
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]//,Exposed=(Window,Worker)]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasDrawPath {
|
interface CanvasDrawPath {
|
||||||
// path API (see also CanvasPathMethods)
|
// path API (see also CanvasPathMethods)
|
||||||
void beginPath();
|
void beginPath();
|
||||||
|
@ -142,12 +143,12 @@ interface CanvasDrawPath {
|
||||||
//boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y);
|
//boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y);
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]//,Exposed=(Window,Worker)]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasUserInterface {
|
interface CanvasUserInterface {
|
||||||
// TODO?
|
// TODO?
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]//,Exposed=(Window,Worker)]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasText {
|
interface CanvasText {
|
||||||
// text (see also the CanvasDrawingStyles interface)
|
// text (see also the CanvasDrawingStyles interface)
|
||||||
//void fillText(DOMString text, unrestricted double x, unrestricted double y,
|
//void fillText(DOMString text, unrestricted double x, unrestricted double y,
|
||||||
|
@ -157,7 +158,7 @@ interface CanvasText {
|
||||||
//TextMetrics measureText(DOMString text);
|
//TextMetrics measureText(DOMString text);
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]//,Exposed=(Window,Worker)]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasDrawImage {
|
interface CanvasDrawImage {
|
||||||
// drawing images
|
// drawing images
|
||||||
[Throws]
|
[Throws]
|
||||||
|
@ -172,7 +173,7 @@ interface CanvasDrawImage {
|
||||||
unrestricted double dw, unrestricted double dh);
|
unrestricted double dw, unrestricted double dh);
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]//,Exposed=(Window,Worker)]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasHitRegion {
|
interface CanvasHitRegion {
|
||||||
// hit regions
|
// hit regions
|
||||||
//void addHitRegion(optional HitRegionOptions options);
|
//void addHitRegion(optional HitRegionOptions options);
|
||||||
|
@ -180,7 +181,7 @@ interface CanvasHitRegion {
|
||||||
//void clearHitRegions();
|
//void clearHitRegions();
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]//,Exposed=(Window,Worker)]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasImageData {
|
interface CanvasImageData {
|
||||||
// pixel manipulation
|
// pixel manipulation
|
||||||
[Throws]
|
[Throws]
|
||||||
|
@ -205,7 +206,7 @@ enum CanvasTextAlign { "start", "end", "left", "right", "center" };
|
||||||
enum CanvasTextBaseline { "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" };
|
enum CanvasTextBaseline { "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" };
|
||||||
enum CanvasDirection { "ltr", "rtl", "inherit" };
|
enum CanvasDirection { "ltr", "rtl", "inherit" };
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasPathDrawingStyles {
|
interface CanvasPathDrawingStyles {
|
||||||
// line caps/joins
|
// line caps/joins
|
||||||
attribute unrestricted double lineWidth; // (default 1)
|
attribute unrestricted double lineWidth; // (default 1)
|
||||||
|
@ -219,7 +220,7 @@ interface CanvasPathDrawingStyles {
|
||||||
//attribute unrestricted double lineDashOffset;
|
//attribute unrestricted double lineDashOffset;
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasTextDrawingStyles {
|
interface CanvasTextDrawingStyles {
|
||||||
// text
|
// text
|
||||||
//attribute DOMString font; // (default 10px sans-serif)
|
//attribute DOMString font; // (default 10px sans-serif)
|
||||||
|
@ -229,7 +230,7 @@ interface CanvasTextDrawingStyles {
|
||||||
//attribute CanvasDirection direction; // "ltr", "rtl", "inherit" (default: "inherit")
|
//attribute CanvasDirection direction; // "ltr", "rtl", "inherit" (default: "inherit")
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface CanvasPath {
|
interface CanvasPath {
|
||||||
// shared path API methods
|
// shared path API methods
|
||||||
void closePath();
|
void closePath();
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
* liability, trademark and document use rules apply.
|
* liability, trademark and document use rules apply.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Abstract]
|
[Abstract, Exposed=(Window,Worker)]
|
||||||
interface CharacterData : Node {
|
interface CharacterData : Node {
|
||||||
[Pure, TreatNullAs=EmptyString] attribute DOMString data;
|
[Pure, TreatNullAs=EmptyString] attribute DOMString data;
|
||||||
[Pure] readonly attribute unsigned long length;
|
[Pure] readonly attribute unsigned long length;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* https://dom.spec.whatwg.org/#interface-childnode
|
* https://dom.spec.whatwg.org/#interface-childnode
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface ChildNode {
|
interface ChildNode {
|
||||||
[Throws, Unscopable]
|
[Throws, Unscopable]
|
||||||
void before((Node or DOMString)... nodes);
|
void before((Node or DOMString)... nodes);
|
||||||
|
@ -18,7 +18,7 @@ interface ChildNode {
|
||||||
void remove();
|
void remove();
|
||||||
};
|
};
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface NonDocumentTypeChildNode {
|
interface NonDocumentTypeChildNode {
|
||||||
[Pure]
|
[Pure]
|
||||||
readonly attribute Element? previousElementSibling;
|
readonly attribute Element? previousElementSibling;
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
|
|
||||||
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#client
|
// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#client
|
||||||
|
|
||||||
// [Exposed=ServiceWorker]
|
[Pref="dom.serviceworker.enabled", Exposed=(Window,Worker)]
|
||||||
[Pref="dom.serviceworker.enabled"]
|
|
||||||
interface Client {
|
interface Client {
|
||||||
readonly attribute USVString url;
|
readonly attribute USVString url;
|
||||||
readonly attribute FrameType frameType;
|
readonly attribute FrameType frameType;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
//https://html.spec.whatwg.org/multipage/#the-closeevent-interfaces
|
//https://html.spec.whatwg.org/multipage/#the-closeevent-interfaces
|
||||||
[Constructor(DOMString type, optional CloseEventInit eventInitDict)/*, Exposed=(Window,Worker)*/]
|
[Constructor(DOMString type, optional CloseEventInit eventInitDict), Exposed=(Window,Worker)]
|
||||||
interface CloseEvent : Event {
|
interface CloseEvent : Event {
|
||||||
readonly attribute boolean wasClean;
|
readonly attribute boolean wasClean;
|
||||||
readonly attribute unsigned short code;
|
readonly attribute unsigned short code;
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
* liability, trademark and document use rules apply.
|
* liability, trademark and document use rules apply.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Constructor(optional DOMString data = "")]
|
[Constructor(optional DOMString data = ""), Exposed=(Window,Worker)]
|
||||||
interface Comment : CharacterData {
|
interface Comment : CharacterData {
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
* © Copyright 2014 Mozilla Foundation.
|
* © Copyright 2014 Mozilla Foundation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface Console {
|
interface Console {
|
||||||
// These should be DOMString message, DOMString message2, ...
|
// These should be DOMString message, DOMString message2, ...
|
||||||
void log(DOMString... messages);
|
void log(DOMString... messages);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface GlobalCrypto {
|
interface GlobalCrypto {
|
||||||
readonly attribute Crypto crypto;
|
readonly attribute Crypto crypto;
|
||||||
};
|
};
|
||||||
|
@ -15,7 +15,7 @@ interface GlobalCrypto {
|
||||||
Window implements GlobalCrypto;
|
Window implements GlobalCrypto;
|
||||||
WorkerGlobalScope implements GlobalCrypto;
|
WorkerGlobalScope implements GlobalCrypto;
|
||||||
|
|
||||||
//[Exposed=(Window,Worker)]
|
[Exposed=(Window,Worker)]
|
||||||
interface Crypto {
|
interface Crypto {
|
||||||
//readonly attribute SubtleCrypto subtle;
|
//readonly attribute SubtleCrypto subtle;
|
||||||
//ArrayBufferView getRandomValues(ArrayBufferView array);
|
//ArrayBufferView getRandomValues(ArrayBufferView array);
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
* http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0.
|
* http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Constructor(DOMString type, optional CustomEventInit eventInitDict)/*,
|
[Constructor(DOMString type, optional CustomEventInit eventInitDict),
|
||||||
Exposed=Window,Worker*/]
|
Exposed=(Window,Worker)]
|
||||||
interface CustomEvent : Event {
|
interface CustomEvent : Event {
|
||||||
readonly attribute any detail;
|
readonly attribute any detail;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* https://heycam.github.io/webidl/#es-DOMException-constructor-object
|
* https://heycam.github.io/webidl/#es-DOMException-constructor-object
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[ExceptionClass]
|
[ExceptionClass, Exposed=(Window,Worker)]
|
||||||
interface DOMException {
|
interface DOMException {
|
||||||
const unsigned short INDEX_SIZE_ERR = 1;
|
const unsigned short INDEX_SIZE_ERR = 1;
|
||||||
const unsigned short DOMSTRING_SIZE_ERR = 2; // historical
|
const unsigned short DOMSTRING_SIZE_ERR = 2; // historical
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
* related or neighboring rights to this work.
|
* related or neighboring rights to this work.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// [Exposed=Window]
|
[Exposed=(Window,Worker)]
|
||||||
interface DOMImplementation {
|
interface DOMImplementation {
|
||||||
[NewObject, Throws]
|
[NewObject, Throws]
|
||||||
DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId,
|
DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId,
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// http://dev.w3.org/fxtf/geometry/Overview.html#dompoint
|
// http://dev.w3.org/fxtf/geometry/Overview.html#dompoint
|
||||||
[Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
|
[Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
|
||||||
optional unrestricted double z = 0, optional unrestricted double w = 1),
|
optional unrestricted double z = 0, optional unrestricted double w = 1),
|
||||||
/*Exposed=(Window,Worker)*/]
|
Exposed=(Window,Worker)]
|
||||||
interface DOMPoint : DOMPointReadOnly {
|
interface DOMPoint : DOMPointReadOnly {
|
||||||
inherit attribute unrestricted double x;
|
inherit attribute unrestricted double x;
|
||||||
inherit attribute unrestricted double y;
|
inherit attribute unrestricted double y;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// http://dev.w3.org/fxtf/geometry/Overview.html#dompointreadonly
|
// http://dev.w3.org/fxtf/geometry/Overview.html#dompointreadonly
|
||||||
[Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
|
[Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
|
||||||
optional unrestricted double z = 0, optional unrestricted double w = 1),
|
optional unrestricted double z = 0, optional unrestricted double w = 1),
|
||||||
/*Exposed=(Window,Worker)*/]
|
Exposed=(Window,Worker)]
|
||||||
interface DOMPointReadOnly {
|
interface DOMPointReadOnly {
|
||||||
readonly attribute unrestricted double x;
|
readonly attribute unrestricted double x;
|
||||||
readonly attribute unrestricted double y;
|
readonly attribute unrestricted double y;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
[Constructor(optional DOMPointInit p1, optional DOMPointInit p2,
|
[Constructor(optional DOMPointInit p1, optional DOMPointInit p2,
|
||||||
optional DOMPointInit p3, optional DOMPointInit p4),
|
optional DOMPointInit p3, optional DOMPointInit p4),
|
||||||
/*Exposed=(Window,Worker)*/]
|
Exposed=(Window,Worker)]
|
||||||
interface DOMQuad {
|
interface DOMQuad {
|
||||||
[NewObject] static DOMQuad fromRect(optional DOMRectInit other);
|
[NewObject] static DOMQuad fromRect(optional DOMRectInit other);
|
||||||
[NewObject] static DOMQuad fromQuad(optional DOMQuadInit other);
|
[NewObject] static DOMQuad fromQuad(optional DOMQuadInit other);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
[Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
|
[Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
|
||||||
optional unrestricted double width = 0, optional unrestricted double height = 0),
|
optional unrestricted double width = 0, optional unrestricted double height = 0),
|
||||||
/*Exposed=(Window,Worker)*/]
|
Exposed=(Window,Worker)]
|
||||||
// https://drafts.fxtf.org/geometry/#domrect
|
// https://drafts.fxtf.org/geometry/#domrect
|
||||||
interface DOMRect : DOMRectReadOnly {
|
interface DOMRect : DOMRectReadOnly {
|
||||||
inherit attribute unrestricted double x;
|
inherit attribute unrestricted double x;
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// http://dev.w3.org/fxtf/geometry/#DOMRectList
|
// http://dev.w3.org/fxtf/geometry/#DOMRectList
|
||||||
[NoInterfaceObject/*,
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
ArrayClass*/]
|
//[ArrayClass]
|
||||||
interface DOMRectList {
|
interface DOMRectList {
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
getter DOMRect? item(unsigned long index);
|
getter DOMRect? item(unsigned long index);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
[Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
|
[Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
|
||||||
optional unrestricted double width = 0, optional unrestricted double height = 0),
|
optional unrestricted double width = 0, optional unrestricted double height = 0),
|
||||||
/*Exposed=(Window,Worker)*/]
|
Exposed=(Window,Worker)]
|
||||||
// https://drafts.fxtf.org/geometry/#domrect
|
// https://drafts.fxtf.org/geometry/#domrect
|
||||||
interface DOMRectReadOnly {
|
interface DOMRectReadOnly {
|
||||||
// [NewObject] static DOMRectReadOnly fromRect(optional DOMRectInit other);
|
// [NewObject] static DOMRectReadOnly fromRect(optional DOMRectInit other);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#the-domstringmap-interface
|
// https://html.spec.whatwg.org/multipage/#the-domstringmap-interface
|
||||||
[OverrideBuiltins]
|
[OverrideBuiltins, Exposed=(Window,Worker)]
|
||||||
interface DOMStringMap {
|
interface DOMStringMap {
|
||||||
getter DOMString (DOMString name);
|
getter DOMString (DOMString name);
|
||||||
[Throws]
|
[Throws]
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#domtokenlist
|
// https://dom.spec.whatwg.org/#domtokenlist
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface DOMTokenList {
|
interface DOMTokenList {
|
||||||
[Pure]
|
[Pure]
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#dedicatedworkerglobalscope
|
// https://html.spec.whatwg.org/multipage/#dedicatedworkerglobalscope
|
||||||
[Global/*=Worker,DedicatedWorker*/]
|
[Global=(Worker,DedicatedWorker), Exposed=DedicatedWorker]
|
||||||
/*sealed*/ interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
|
/*sealed*/ interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
|
||||||
[Throws]
|
[Throws]
|
||||||
void postMessage(any message/*, optional sequence<Transferable> transfer*/);
|
void postMessage(any message/*, optional sequence<Transferable> transfer*/);
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#interface-document
|
// https://dom.spec.whatwg.org/#interface-document
|
||||||
[Constructor]
|
[Constructor, Exposed=(Window,Worker)]
|
||||||
interface Document : Node {
|
interface Document : Node {
|
||||||
[SameObject]
|
[SameObject]
|
||||||
readonly attribute DOMImplementation implementation;
|
readonly attribute DOMImplementation implementation;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#interface-documentfragment
|
// https://dom.spec.whatwg.org/#interface-documentfragment
|
||||||
[Constructor]
|
[Constructor, Exposed=(Window,Worker)]
|
||||||
interface DocumentFragment : Node {
|
interface DocumentFragment : Node {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
* liability, trademark and document use rules apply.
|
* liability, trademark and document use rules apply.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface DocumentType : Node {
|
interface DocumentType : Node {
|
||||||
[Constant]
|
[Constant]
|
||||||
readonly attribute DOMString name;
|
readonly attribute DOMString name;
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
* liability, trademark and document use rules apply.
|
* liability, trademark and document use rules apply.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface Element : Node {
|
interface Element : Node {
|
||||||
[Constant]
|
[Constant]
|
||||||
readonly attribute DOMString? namespaceURI;
|
readonly attribute DOMString? namespaceURI;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
//http://dev.w3.org/csswg/cssom/#elementcssinlinestyle
|
//http://dev.w3.org/csswg/cssom/#elementcssinlinestyle
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface ElementCSSInlineStyle {
|
interface ElementCSSInlineStyle {
|
||||||
[SameObject/*, PutForwards=cssText*/] readonly attribute CSSStyleDeclaration style;
|
[SameObject/*, PutForwards=cssText*/] readonly attribute CSSStyleDeclaration style;
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#elementcontenteditable
|
// https://html.spec.whatwg.org/multipage/#elementcontenteditable
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface ElementContentEditable {
|
interface ElementContentEditable {
|
||||||
// attribute DOMString contentEditable;
|
// attribute DOMString contentEditable;
|
||||||
// readonly attribute boolean isContentEditable;
|
// readonly attribute boolean isContentEditable;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#the-errorevent-interface
|
// https://html.spec.whatwg.org/multipage/#the-errorevent-interface
|
||||||
|
|
||||||
[Constructor(DOMString type, optional ErrorEventInit eventInitDict)/*, Exposed=(Window,Worker)*/]
|
[Constructor(DOMString type, optional ErrorEventInit eventInitDict), Exposed=(Window,Worker)]
|
||||||
interface ErrorEvent : Event {
|
interface ErrorEvent : Event {
|
||||||
readonly attribute DOMString message;
|
readonly attribute DOMString message;
|
||||||
readonly attribute DOMString filename;
|
readonly attribute DOMString filename;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* https://dom.spec.whatwg.org/#event
|
* https://dom.spec.whatwg.org/#event
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Constructor(DOMString type, optional EventInit eventInitDict)]
|
[Constructor(DOMString type, optional EventInit eventInitDict), Exposed=(Window,Worker)]
|
||||||
interface Event {
|
interface Event {
|
||||||
[Pure]
|
[Pure]
|
||||||
readonly attribute DOMString type;
|
readonly attribute DOMString type;
|
||||||
|
|
|
@ -25,7 +25,7 @@ callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event);
|
||||||
typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
|
typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#globaleventhandlers
|
// https://html.spec.whatwg.org/multipage/#globaleventhandlers
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface GlobalEventHandlers {
|
interface GlobalEventHandlers {
|
||||||
attribute EventHandler onabort;
|
attribute EventHandler onabort;
|
||||||
attribute EventHandler onblur;
|
attribute EventHandler onblur;
|
||||||
|
@ -90,7 +90,7 @@ interface GlobalEventHandlers {
|
||||||
};
|
};
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#windoweventhandlers
|
// https://html.spec.whatwg.org/multipage/#windoweventhandlers
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface WindowEventHandlers {
|
interface WindowEventHandlers {
|
||||||
attribute EventHandler onafterprint;
|
attribute EventHandler onafterprint;
|
||||||
attribute EventHandler onbeforeprint;
|
attribute EventHandler onbeforeprint;
|
||||||
|
@ -110,7 +110,7 @@ interface WindowEventHandlers {
|
||||||
};
|
};
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#documentandelementeventhandlers
|
// https://html.spec.whatwg.org/multipage/#documentandelementeventhandlers
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface DocumentAndElementEventHandlers {
|
interface DocumentAndElementEventHandlers {
|
||||||
attribute EventHandler oncopy;
|
attribute EventHandler oncopy;
|
||||||
attribute EventHandler oncut;
|
attribute EventHandler oncut;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Constructor(DOMString url, optional EventSourceInit eventSourceInitDict),
|
[Constructor(DOMString url, optional EventSourceInit eventSourceInitDict),
|
||||||
/*Exposed=(Window,Worker)*/]
|
Exposed=(Window,Worker)]
|
||||||
interface EventSource : EventTarget {
|
interface EventSource : EventTarget {
|
||||||
readonly attribute DOMString url;
|
readonly attribute DOMString url;
|
||||||
readonly attribute boolean withCredentials;
|
readonly attribute boolean withCredentials;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* https://dom.spec.whatwg.org/#interface-eventtarget
|
* https://dom.spec.whatwg.org/#interface-eventtarget
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Abstract]
|
[Abstract, Exposed=(Window,Worker)]
|
||||||
interface EventTarget {
|
interface EventTarget {
|
||||||
void addEventListener(DOMString type,
|
void addEventListener(DOMString type,
|
||||||
EventListener? listener,
|
EventListener? listener,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
[Constructor(sequence<BlobPart> fileBits,
|
[Constructor(sequence<BlobPart> fileBits,
|
||||||
DOMString fileName,
|
DOMString fileName,
|
||||||
optional FilePropertyBag options),
|
optional FilePropertyBag options),
|
||||||
Exposed=Window/*,Worker*/]
|
Exposed=(Window,Worker)]
|
||||||
interface File : Blob {
|
interface File : Blob {
|
||||||
readonly attribute DOMString name;
|
readonly attribute DOMString name;
|
||||||
readonly attribute long long lastModified;
|
readonly attribute long long lastModified;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
// https://w3c.github.io/FileAPI/#dfn-filelist
|
// https://w3c.github.io/FileAPI/#dfn-filelist
|
||||||
|
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface FileList {
|
interface FileList {
|
||||||
getter File? item(unsigned long index);
|
getter File? item(unsigned long index);
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// http://dev.w3.org/2006/webapi/FileAPI/#APIASynch
|
// http://dev.w3.org/2006/webapi/FileAPI/#APIASynch
|
||||||
|
|
||||||
//typedef (DOMString or ArrayBuffer) FileReaderResult;
|
//typedef (DOMString or ArrayBuffer) FileReaderResult;
|
||||||
[Constructor, Exposed=Window/*,Worker*/]
|
[Constructor, Exposed=(Window,Worker)]
|
||||||
interface FileReader: EventTarget {
|
interface FileReader: EventTarget {
|
||||||
|
|
||||||
// async read methods
|
// async read methods
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://w3c.github.io/uievents/#interface-FocusEvent
|
// https://w3c.github.io/uievents/#interface-FocusEvent
|
||||||
[Constructor(DOMString typeArg, optional FocusEventInit focusEventInitDict)]
|
[Constructor(DOMString typeArg, optional FocusEventInit focusEventInitDict), Exposed=(Window,Worker)]
|
||||||
interface FocusEvent : UIEvent {
|
interface FocusEvent : UIEvent {
|
||||||
readonly attribute EventTarget? relatedTarget;
|
readonly attribute EventTarget? relatedTarget;
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
[Pref="dom.forcetouch.enabled"]
|
[Pref="dom.forcetouch.enabled", Exposed=(Window,Worker)]
|
||||||
interface ForceTouchEvent : UIEvent {
|
interface ForceTouchEvent : UIEvent {
|
||||||
// Represents the amount of force required to perform a regular click.
|
// Represents the amount of force required to perform a regular click.
|
||||||
readonly attribute float SERVO_FORCE_AT_MOUSE_DOWN;
|
readonly attribute float SERVO_FORCE_AT_MOUSE_DOWN;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
typedef (Blob or USVString) FormDataEntryValue;
|
typedef (Blob or USVString) FormDataEntryValue;
|
||||||
|
|
||||||
[Constructor(optional HTMLFormElement form),
|
[Constructor(optional HTMLFormElement form),
|
||||||
/*Exposed=(Window,Worker)*/]
|
Exposed=(Window,Worker)]
|
||||||
interface FormData {
|
interface FormData {
|
||||||
void append(USVString name, USVString value);
|
void append(USVString name, USVString value);
|
||||||
void append(USVString name, Blob value, optional USVString filename);
|
void append(USVString name, Blob value, optional USVString filename);
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlanchorelement
|
// https://html.spec.whatwg.org/multipage/#htmlanchorelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLAnchorElement : HTMLElement {
|
interface HTMLAnchorElement : HTMLElement {
|
||||||
attribute DOMString target;
|
attribute DOMString target;
|
||||||
// attribute DOMString download;
|
// attribute DOMString download;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlappletelement
|
// https://html.spec.whatwg.org/multipage/#htmlappletelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLAppletElement : HTMLElement {
|
interface HTMLAppletElement : HTMLElement {
|
||||||
// attribute DOMString align;
|
// attribute DOMString align;
|
||||||
// attribute DOMString alt;
|
// attribute DOMString alt;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlareaelement
|
// https://html.spec.whatwg.org/multipage/#htmlareaelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLAreaElement : HTMLElement {
|
interface HTMLAreaElement : HTMLElement {
|
||||||
// attribute DOMString alt;
|
// attribute DOMString alt;
|
||||||
// attribute DOMString coords;
|
// attribute DOMString coords;
|
||||||
|
|
|
@ -4,4 +4,5 @@
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlaudioelement
|
// https://html.spec.whatwg.org/multipage/#htmlaudioelement
|
||||||
//[NamedConstructor=Audio(optional DOMString src)]
|
//[NamedConstructor=Audio(optional DOMString src)]
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLAudioElement : HTMLMediaElement {};
|
interface HTMLAudioElement : HTMLMediaElement {};
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlbrelement
|
// https://html.spec.whatwg.org/multipage/#htmlbrelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLBRElement : HTMLElement {
|
interface HTMLBRElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlbaseelement
|
// https://html.spec.whatwg.org/multipage/#htmlbaseelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLBaseElement : HTMLElement {
|
interface HTMLBaseElement : HTMLElement {
|
||||||
attribute DOMString href;
|
attribute DOMString href;
|
||||||
// attribute DOMString target;
|
// attribute DOMString target;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#the-body-element
|
// https://html.spec.whatwg.org/multipage/#the-body-element
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLBodyElement : HTMLElement {
|
interface HTMLBodyElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlbuttonelement
|
// https://html.spec.whatwg.org/multipage/#htmlbuttonelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLButtonElement : HTMLElement {
|
interface HTMLButtonElement : HTMLElement {
|
||||||
// attribute boolean autofocus;
|
// attribute boolean autofocus;
|
||||||
attribute boolean disabled;
|
attribute boolean disabled;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlcanvaselement
|
// https://html.spec.whatwg.org/multipage/#htmlcanvaselement
|
||||||
typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext;
|
typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext;
|
||||||
|
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLCanvasElement : HTMLElement {
|
interface HTMLCanvasElement : HTMLElement {
|
||||||
[Pure]
|
[Pure]
|
||||||
attribute unsigned long width;
|
attribute unsigned long width;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#interface-htmlcollection
|
// https://dom.spec.whatwg.org/#interface-htmlcollection
|
||||||
|
|
||||||
[LegacyUnenumerableNamedProperties]
|
[LegacyUnenumerableNamedProperties, Exposed=(Window,Worker)]
|
||||||
interface HTMLCollection {
|
interface HTMLCollection {
|
||||||
[Pure]
|
[Pure]
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmldlistelement
|
// https://html.spec.whatwg.org/multipage/#htmldlistelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLDListElement : HTMLElement {
|
interface HTMLDListElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmldataelement
|
// https://html.spec.whatwg.org/multipage/#htmldataelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLDataElement : HTMLElement {
|
interface HTMLDataElement : HTMLElement {
|
||||||
// attribute DOMString value;
|
// attribute DOMString value;
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmldatalistelement
|
// https://html.spec.whatwg.org/multipage/#htmldatalistelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLDataListElement : HTMLElement {
|
interface HTMLDataListElement : HTMLElement {
|
||||||
readonly attribute HTMLCollection options;
|
readonly attribute HTMLCollection options;
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmldetailselement
|
// https://html.spec.whatwg.org/multipage/#htmldetailselement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLDetailsElement : HTMLElement {
|
interface HTMLDetailsElement : HTMLElement {
|
||||||
attribute boolean open;
|
attribute boolean open;
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmldialogelement
|
// https://html.spec.whatwg.org/multipage/#htmldialogelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLDialogElement : HTMLElement {
|
interface HTMLDialogElement : HTMLElement {
|
||||||
attribute boolean open;
|
attribute boolean open;
|
||||||
attribute DOMString returnValue;
|
attribute DOMString returnValue;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmldirectoryelement
|
// https://html.spec.whatwg.org/multipage/#htmldirectoryelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLDirectoryElement : HTMLElement {
|
interface HTMLDirectoryElement : HTMLElement {
|
||||||
// attribute boolean compact;
|
// attribute boolean compact;
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmldivelement
|
// https://html.spec.whatwg.org/multipage/#htmldivelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLDivElement : HTMLElement {
|
interface HTMLDivElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlelement
|
// https://html.spec.whatwg.org/multipage/#htmlelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLElement : Element {
|
interface HTMLElement : Element {
|
||||||
// metadata attributes
|
// metadata attributes
|
||||||
attribute DOMString title;
|
attribute DOMString title;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlembedelement
|
// https://html.spec.whatwg.org/multipage/#htmlembedelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLEmbedElement : HTMLElement {
|
interface HTMLEmbedElement : HTMLElement {
|
||||||
// attribute DOMString src;
|
// attribute DOMString src;
|
||||||
// attribute DOMString type;
|
// attribute DOMString type;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlfieldsetelement
|
// https://html.spec.whatwg.org/multipage/#htmlfieldsetelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLFieldSetElement : HTMLElement {
|
interface HTMLFieldSetElement : HTMLElement {
|
||||||
attribute boolean disabled;
|
attribute boolean disabled;
|
||||||
readonly attribute HTMLFormElement? form;
|
readonly attribute HTMLFormElement? form;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlfontelement
|
// https://html.spec.whatwg.org/multipage/#htmlfontelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLFontElement : HTMLElement {
|
interface HTMLFontElement : HTMLElement {
|
||||||
[TreatNullAs=EmptyString] attribute DOMString color;
|
[TreatNullAs=EmptyString] attribute DOMString color;
|
||||||
attribute DOMString face;
|
attribute DOMString face;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlformcontrolscollection
|
// https://html.spec.whatwg.org/multipage/#htmlformcontrolscollection
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLFormControlsCollection : HTMLCollection {
|
interface HTMLFormControlsCollection : HTMLCollection {
|
||||||
// inherits length and item()
|
// inherits length and item()
|
||||||
getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem()
|
getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem()
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlformelement
|
// https://html.spec.whatwg.org/multipage/#htmlformelement
|
||||||
//[OverrideBuiltins]
|
//[OverrideBuiltins]
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLFormElement : HTMLElement {
|
interface HTMLFormElement : HTMLElement {
|
||||||
attribute DOMString acceptCharset;
|
attribute DOMString acceptCharset;
|
||||||
attribute DOMString action;
|
attribute DOMString action;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlframeelement
|
// https://html.spec.whatwg.org/multipage/#htmlframeelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLFrameElement : HTMLElement {
|
interface HTMLFrameElement : HTMLElement {
|
||||||
// attribute DOMString name;
|
// attribute DOMString name;
|
||||||
// attribute DOMString scrolling;
|
// attribute DOMString scrolling;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlframesetelement
|
// https://html.spec.whatwg.org/multipage/#htmlframesetelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLFrameSetElement : HTMLElement {
|
interface HTMLFrameSetElement : HTMLElement {
|
||||||
// attribute DOMString cols;
|
// attribute DOMString cols;
|
||||||
// attribute DOMString rows;
|
// attribute DOMString rows;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlhrelement
|
// https://html.spec.whatwg.org/multipage/#htmlhrelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLHRElement : HTMLElement {
|
interface HTMLHRElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,4 +3,5 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlheadelement
|
// https://html.spec.whatwg.org/multipage/#htmlheadelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLHeadElement : HTMLElement {};
|
interface HTMLHeadElement : HTMLElement {};
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlheadingelement
|
// https://html.spec.whatwg.org/multipage/#htmlheadingelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLHeadingElement : HTMLElement {
|
interface HTMLHeadingElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlhtmlelement
|
// https://html.spec.whatwg.org/multipage/#htmlhtmlelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLHtmlElement : HTMLElement {
|
interface HTMLHtmlElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlhyperlinkelementutils
|
// https://html.spec.whatwg.org/multipage/#htmlhyperlinkelementutils
|
||||||
[NoInterfaceObject/*, Exposed=Window*/]
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
||||||
interface HTMLHyperlinkElementUtils {
|
interface HTMLHyperlinkElementUtils {
|
||||||
// stringifier attribute USVString href;
|
// stringifier attribute USVString href;
|
||||||
attribute USVString href;
|
attribute USVString href;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmliframeelement
|
// https://html.spec.whatwg.org/multipage/#htmliframeelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLIFrameElement : HTMLElement {
|
interface HTMLIFrameElement : HTMLElement {
|
||||||
attribute DOMString src;
|
attribute DOMString src;
|
||||||
// attribute DOMString srcdoc;
|
// attribute DOMString srcdoc;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlimageelement
|
// https://html.spec.whatwg.org/multipage/#htmlimageelement
|
||||||
[NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
|
[NamedConstructor=Image(optional unsigned long width, optional unsigned long height), Exposed=(Window,Worker)]
|
||||||
interface HTMLImageElement : HTMLElement {
|
interface HTMLImageElement : HTMLElement {
|
||||||
attribute DOMString alt;
|
attribute DOMString alt;
|
||||||
attribute DOMString src;
|
attribute DOMString src;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlinputelement
|
// https://html.spec.whatwg.org/multipage/#htmlinputelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLInputElement : HTMLElement {
|
interface HTMLInputElement : HTMLElement {
|
||||||
attribute DOMString accept;
|
attribute DOMString accept;
|
||||||
attribute DOMString alt;
|
attribute DOMString alt;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmllielement
|
// https://html.spec.whatwg.org/multipage/#htmllielement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLLIElement : HTMLElement {
|
interface HTMLLIElement : HTMLElement {
|
||||||
// attribute long value;
|
// attribute long value;
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmllabelelement
|
// https://html.spec.whatwg.org/multipage/#htmllabelelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLLabelElement : HTMLElement {
|
interface HTMLLabelElement : HTMLElement {
|
||||||
readonly attribute HTMLFormElement? form;
|
readonly attribute HTMLFormElement? form;
|
||||||
attribute DOMString htmlFor;
|
attribute DOMString htmlFor;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmllegendelement
|
// https://html.spec.whatwg.org/multipage/#htmllegendelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLLegendElement : HTMLElement {
|
interface HTMLLegendElement : HTMLElement {
|
||||||
readonly attribute HTMLFormElement? form;
|
readonly attribute HTMLFormElement? form;
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmllinkelement
|
// https://html.spec.whatwg.org/multipage/#htmllinkelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLLinkElement : HTMLElement {
|
interface HTMLLinkElement : HTMLElement {
|
||||||
attribute DOMString href;
|
attribute DOMString href;
|
||||||
// attribute DOMString crossOrigin;
|
// attribute DOMString crossOrigin;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlmapelement
|
// https://html.spec.whatwg.org/multipage/#htmlmapelement
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
interface HTMLMapElement : HTMLElement {
|
interface HTMLMapElement : HTMLElement {
|
||||||
// attribute DOMString name;
|
// attribute DOMString name;
|
||||||
//readonly attribute HTMLCollection areas;
|
//readonly attribute HTMLCollection areas;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlmediaelement
|
// https://html.spec.whatwg.org/multipage/#htmlmediaelement
|
||||||
enum CanPlayTypeResult { "" /* empty string */, "maybe", "probably" };
|
enum CanPlayTypeResult { "" /* empty string */, "maybe", "probably" };
|
||||||
[Abstract]
|
[Abstract, Exposed=(Window,Worker)]
|
||||||
interface HTMLMediaElement : HTMLElement {
|
interface HTMLMediaElement : HTMLElement {
|
||||||
|
|
||||||
// error state
|
// error state
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue