From eed5467a4f160c7d0391c268300d30aecafd6f67 Mon Sep 17 00:00:00 2001
From: Anne van Kesteren It is not possible for a user object to implement Unless otherwise specified, each ECMAScript global environment exposes all interfaces that the implementation supports. If a given ECMAScript global environment does not
@@ -8018,7 +8017,7 @@ Because of the way variable declarations are handled in
ECMAScript, the code above would result in the The value of the The value of the Some objects, which are attempting to emulate map- and set-like interfaces, will want to accept iterables
-as constructor parameters and initialize themselves in this way. Here we provide some algorithms that can
-be invoked in order to do so in the same way as in the ECMAScript spec, so that those objects behave
-the same as the built-in To add map elements from an iterable iterable to
-an object destination with adder method name adder, perform the following steps: If Type(destination) is not Object, then, throw a If iterable is not present, let iterable be If iterable is either Else, Let adder be the result of Get(destination, adder). ReturnIfAbrupt(adder). If IsCallable(adder) is Let iter be the result of GetIterator(iterable). ReturnIfAbrupt(iter). If iter is Repeat Let next be the result of IteratorStep(iter). ReturnIfAbrupt(next). If next is Let nextItem be IteratorValue(next). ReturnIfAbrupt(nextItem). If Type(nextItem) is not Object, then throw a Let k be the result of Get(nextItem, ReturnIfAbrupt(k). Let v be the result of Get(nextItem, ReturnIfAbrupt(v). Let status be the result of calling the [[Call]] internal method of adder with destination as thisArgument and (k, v) as argumentsList. ReturnIfAbrupt(status). The interface prototype object of an interface A must have a copy of
each property that corresponds to one of the constants, attributes, operations, iterable declarations, maplike declarations and setlike declarations that exist on all of the interface prototype objects of A’s consequential interfaces.
@@ -11317,10 +11257,10 @@ Platform objects implementing an interface that supports indexed or named properties cannot be fixed; if Initializing objects from iterables
-
-Some objects, which are attempting to emulate map- and set-like interfaces, will want to accept iterables
-as constructor parameters and initialize themselves in this way. Here we provide some algorithms that can
-be invoked in order to do so in the same way as in the ECMAScript spec, so that those objects behave
-the same as the built-in
- 1. If [=Type=](|destination|) is not Object, then, throw a
-
-
"0"
).
- 1. [=ReturnIfAbrupt=](|k|).
- 1. Let |v| be the result of [=Get=](|nextItem|, "1"
).
- 1. [=ReturnIfAbrupt=](|v|).
- 1. Let |status| be the result of calling the \[[Call]] internal method of |adder| with |destination| as
- |thisArgument| and (|k|, |v|) as |argumentsList|.
- 1. [=ReturnIfAbrupt=](|status|).
-Implements statements
The [=interface prototype object=]
diff --git a/index.html b/index.html
index 357c9143..d9ce4008 100644
--- a/index.html
+++ b/index.html
@@ -1544,7 +1544,7 @@
Web IDL
- Editor’s Draft,
+ Editor’s Draft,
Table of Contents
};
node.addEventListener("click", listener); // This works.
-node.addEventListener("click", function() { ... }); // As does this.
+node.addEventListener("click", function() { ... }); // As does this.
Node
, however:var node = getNode(); // Obtain an instance of Node.
@@ -4520,7 +4519,7 @@
@@ -6265,9 +6264,9 @@ }
// This loop will also alert "anna" and then "brian".
-for (let session of sm) {
+
for (let session of sm) {
window.alert(session.username);
}
initial objects,
which the following HTML document demonstrates:
<!DOCTYPE html>
-<title>Different global environments</title>
-<iframe id=a></iframe>
-<script>
+<title>Different global environments</title>
+<iframe id=a></iframe>
+<script>
var iframe = document.getElementById("a");
var w = iframe.contentWindow; // The global object in the frame
@@ -6277,7 +6276,7 @@
</script>
instanceof w.Object; // Evaluates to false
iframe.appendChild instanceof Function; // Evaluates to true
iframe.appendChild instanceof w.Function; // Evaluates to false
-</script>
+
.mozIndexedDB || window.msIndexedDB;
var requestAnimationFrame = window.requestAnimationFrame ||
- window.mozRequestAnimationFrame || ...;
+ window.mozRequestAnimationFrame || ...;
window.indexedDB
and window.requestAnimationFrame
evaluating
@@ -8105,28 +8104,28 @@ <!DOCTYPE html>
-<title>Variable declarations and assignments on Window</title>
-<iframe name=abc></iframe>
+<title>Variable declarations and assignments on Window</title>
+<iframe name=abc></iframe>
<!-- Shadowing named properties -->
-<script>
+<script>
window.abc; // Evaluates to the iframe’s Window object.
abc = 1; // Shadows the named property.
window.abc; // Evaluates to 1.
-</script>
+</script>
<!-- Preserving properties for IDL attributes -->
-<script>
+<script>
Window.prototype.def = 2; // Places a property on the prototype.
window.hasOwnProperty("length"); // Evaluates to true.
length; // Evaluates to 1.
def; // Evaluates to 2.
-</script>
-<script>
+</script>
+<script>
var length; // Variable declaration leaves existing property.
length; // Evaluates to 1.
var def; // Variable declaration creates shadowing property.
def; // Evaluates to undefined.
-</script>
+</script>
3.3.6. [LegacyArrayClass]
@@ -11143,65 +11142,6 @@
3.6.12. Initializing objects from iterables
-
-
-
-
-
- "0"
)."1"
).3.7. Implements statements
Object.freeze
, Object.seal
or Object.preventExtensions
is called on one of these objects, the function
-must throw a Global
] or
[PrimaryGlobal
]
-also must throw a
The name of each property that appears to exist due to an object supporting indexed properties is an array index property name, which is a property name P such that Type(P) is String @@ -12637,7 +12577,6 @@