From ebd5af0fd6f12ac63cf39d570e128c0051158bba Mon Sep 17 00:00:00 2001
From: Timothy Gu SharedArrayBuffer
classTypeError
classRangeError
classtypeof
operator
Objects that implement the HTMLAllCollection
interface are legacy platform objects with an additonal [[Call]] internal
- method described in the section below.
All HTMLAllCollection
objects are rooted at a Document
and have a filter that matches all elements, so the elements represented by the
collection of an HTMLAllCollection
object consist of all the descendant
elements of the root Document
.
Objects that implement the HTMLAllCollection
interface are legacy platform objects with an additonal [[Call]] internal
+ method described in the section below. They also have an
+ [[IsHTMLDDA]] internal slot.
Objects that implement the HTMLAllCollection
interface have several unusual
+ behaviors, due of the fact that they have an [[IsHTMLDDA]] internal slot:
The ToBoolean abstract operation in JavaScript returns
+ false when given objects implementing the HTMLAllCollection
interface.
The Abstract Equality Comparison algorithm,
+ when given objects implementing the HTMLAllCollection
interface, returns true when
+ compared to the undefined
and null
values.
+ (Comparisons using the Strict Equality Comparison
+ algorithm, and Abstract Equality comparisons to other values such as strings or objects, are
+ unaffected.)
The typeof
operator in JavaScript returns the string
+ "undefined"
when applied to objects implementing the
+ HTMLAllCollection
interface.
These special behaviors are motivated by a desire for compatibility with two classes of legacy
+ content: one that uses the presence of document.all
as a
+ way to detect legacy user agents, and one that only supports those legacy user agents and uses
+ the document.all
object without testing for its presence
+ first.
[Exposed=Window, LegacyUnenumerableNamedProperties] interface HTMLAllCollection { @@ -7174,7 +7203,7 @@ interface HTMLAllCollection { getter (HTMLCollection or Element)? namedItem(DOMString name); (HTMLCollection or Element)? item(optional DOMString nameOrIndex); - // Note: HTMLAllCollection objects have a custom [[Call]] internal method. + // Note: HTMLAllCollection objects have a custom [[Call]] internal method and an [[IsHTMLDDA]] internal slot. };
HTMLAllCollection
rooted at the Document
node, whose filter matches all
elements.
- The object returned for all
has several unusual
- behaviors:
The user agent must act as if the ToBoolean abstract
- operation in JavaScript returns false when given the object returned for all
.
The user agent must act as if the Abstract Equality
- Comparison algorithm, when given the object returned for all
, returns true when compared to the undefined
and null
values. (Comparisons using the Strict Equality Comparison algorithm, and Abstract Equality
- comparisons to other values such as strings or objects, are unaffected.)
The user agent must act such that the typeof
operator in
- JavaScript returns the string "undefined"
when applied to the object
- returned for all
.
These requirements are a willful violation of the JavaScript
- specification current at the time of writing. The JavaScript specification
- requires that ToBoolean return true for all objects, and does not have
- provisions for objects acting as if they were undefined
for the purposes of
- certain operators. This violation is motivated by a desire for compatibility with two classes of
- legacy content: one that uses the presence of document.all
- as a way to detect legacy user agents, and one that only supports those legacy user agents and
- uses the document.all
object without testing for its
- presence first.
partial interface Window {