Skip to content

IDL extended attributes

Generated from docs/site/data/idl-attributes.yaml when the site was built at 7aa23e2.

niso’s IDL in idl/ is standard WebIDL plus a few extended attributes of its own, all named Niso*, which crates/niso-idl reads when it generates the C API, the JS binding and the JVM classes. The counts are from idl/ when the site was built; the meanings are from docs/site/data/idl-attributes.yaml, and the build fails if idl/ uses an attribute that file doesn’t describe.

The member has no JavaScript method or property: only the binding’s own code calls its C function, as the glue does for getEventHandler. It is still in niso.h.

Used 145 times, in canvas.webidl (29), cssom.webidl (1), dom.webidl (10), html.webidl (15), indexeddb.webidl (24), messaging.webidl (5), url.webidl (4), web-animations.webidl (21), webcrypto.webidl (29), workers.webidl (5), xpath.webidl (2).

Like NisoInternal, hidden from JavaScript, but meant for native code: the C API and the JVM binding have it. Used where the platform delivers a value natively, such as the serialization that arrived with a message.

Used 4 times, in dom-parsing.webidl (2), messaging.webidl (2).

The member (or a whole interface’s members) is written by hand in the JS glue instead of being generated, usually because the standard’s overloads and unions don’t map onto one C function. On a [NisoValue] interface, the glue defines the class itself.

Used 97 times, in canvas.webidl (26), html.webidl (6), indexeddb.webidl (45), uievents.webidl (1), web-animations.webidl (17), xpath.webidl (2).

The operation can run script before it returns (dispatchEvent runs listeners), so its generated entry point releases the document between callbacks instead of holding it for the whole call.

Used 21 times, in dom.webidl (17), html.webidl (3), workers.webidl (1).

On any only: the binding’s own value, held by the DOM by reference as an opaque pointer with a drop function rather than copied, so it keeps its identity. Only the binding that made it can read it.

Used 14 times, in dom.webidl (7), messaging.webidl (4), workers.webidl (3).

The interface has no identity in the core (DOMRect, TextMetrics, ImageData), so it crosses the C API as a struct rather than a handle.

Used 3 times, in canvas.webidl (2), html.webidl (1).

The interface (NodeList, HTMLCollection) crosses the C API as an array of handles and is an Array in JavaScript.

Used 2 times, in dom.webidl (2).

A buffer source argument whose own bytes the call may write, as getRandomValues does; an operation that takes one and returns a buffer returns that argument.

Used 1 times, in webcrypto.webidl (1).

With NisoMut: only integer-typed arrays are accepted; others fail with TypeMismatchError.

Used 1 times, in webcrypto.webidl (1).

On a dictionary argument that the standard also accepts as a boolean: a boolean passed instead sets the named member ([NisoBooleanIs=capture] on addEventListener’s options).

Used 2 times, in dom.webidl (2).

On a callback: the named argument is also the callback’s this value.

Used 2 times, in dom.webidl (1), resize-observer.webidl (1).

Marks an interface as a native module: native code implements it and pages call it ([NisoModule=name]), generated by niso-module. See the modules design note.

Not used in idl/ (module IDL files use it).