You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Temporarily make [Exposed] and globalNames non-required
This reverts the breaking changes introduced in #191, since it was accidentally released as a minor version in v15.2.0, while keeping the functionality.
Copy file name to clipboardExpand all lines: README.md
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -270,6 +270,8 @@ This method creates a brand new wrapper constructor and prototype and attach it
270
270
271
271
The second argument `globalNames` is an array containing the [global names](https://heycam.github.io/webidl/#dfn-global-name) of the interface that `globalObject` implements. This is used for the purposes of deciding which interfaces are [exposed](https://heycam.github.io/webidl/#dfn-exposed). For example, this array should be `["Window"]` for a [`Window`](https://html.spec.whatwg.org/multipage/window-object.html#window) global object. But for a [`DedicatedWorkerGlobalScope`](https://html.spec.whatwg.org/multipage/workers.html#dedicatedworkerglobalscope) global object, this array should be `["Worker", "DedicatedWorker"]`. Note that we do not yet implement [`[SecureContext]`](https://heycam.github.io/webidl/#SecureContext), so the "exposed" check is not fully implemented.
272
272
273
+
Temporarily, until the next major release, `globalNames` defaults to `["Window"]`.
Creates a new instance of the wrapper class and corresponding implementation class, passing in the `globalObject`, the `constructorArgs` array and `privateData` object to the implementation class constructor. Then returns the wrapper class.
@@ -304,10 +306,12 @@ The resulting function has an _objectReference_ property, which is the same obje
304
306
305
307
If any part of the conversion fails, _context_ can be used to describe the provided value in any resulting error message.
306
308
307
-
#### `install(globalObject)`
309
+
#### `install(globalObject, globalNames)`
308
310
309
311
If this callback interface has constants, then this method creates a brand new legacy callback interface object and attaches it to the passed `globalObject`. Otherwise, this method is a no-op.
310
312
313
+
The second argument `globalNames` is the same as for [the `install()` export for interfaces](#installglobalobject-globalnames). (However, it does not have a default.)
314
+
311
315
### For dictionaries
312
316
313
317
#### `convert(value, { context })`
@@ -462,7 +466,7 @@ webidl2js is implementing an ever-growing subset of the Web IDL specification. S
462
466
- Variadic arguments
463
467
-`[Clamp]`
464
468
-`[EnforceRange]`
465
-
-`[Exposed]`
469
+
-`[Exposed]` (temporarily defaulting to `[Exposed=Window]`)
0 commit comments