Skip to content

C API

Generated from crates/niso-capi/build.rs when the site was built at 7aa23e2.

Every language reaches niso through one API over node ids. Its C form is two headers, which crates/niso-capi’s build script writes and this reference is generated from on every build of the site:

  • niso.h, generated from idl/*.webidl by niso-idl: 1627 functions, one per attribute getter and setter, operation and constructor. They are listed under each interface in the Web API reference, with their C prototypes.
  • niso_runtime.h, written by hand in sections that each belong to one crate and composed by niso-compose (crates/niso-compose/sections.txt): what the IDL can’t say, 183 functions in all with the headers below. niso.h includes it.

Start with Conventions: the rules every caller follows. Both composed headers are also served whole: niso.h and niso_runtime.h. To get them in a checkout, run cargo xtask docs, which writes them to target/docs/.

Section Owner Functions
Conventions niso-compose 0
types niso-base 0
status niso-base 0
event-loop niso-sched 4
storage-driver niso-storage 0
storage-config niso-storage 3
structured-clone niso-structured-clone 4
hooks niso-core 0
document niso-core 22
loading niso-core 6
rendering niso-core 25
handles niso-core 4
worker-hooks niso-messaging 0
workers niso-messaging 12
network niso-fetch 7
media niso-media 6
modules niso-modules 7
wasm niso-wasm 27
Interface Functions
(other) 413
AbortController 3
AbortSignal 11
Animation 34
AnimationEffect 3
AnimationPlaybackEvent 3
AnimationTimeline 1
Attr 8
BroadcastChannel 8
CanvasGradient 1
CanvasPattern 1
CanvasRenderingContext2D 4
CharacterData 8
CloseEvent 5
Comment 1
Crypto 31
CSS 3
CSSConditionRule 1
CSSFontFaceRule 1
CSSGroupingRule 3
CSSImportRule 1
CSSKeyframeRule 2
CSSKeyframesRule 5
CSSLayerBlockRule 1
CSSNamespaceRule 2
CSSRule 5
CSSRuleList 2
CSSStyleDeclaration 9
CSSStyleRule 3
CSSStyleSheet 7
CustomElementRegistry 3
CustomEvent 4
DedicatedWorkerGlobalScope 9
Document 52
DocumentFragment 1
DocumentTimeline 2
DocumentType 3
DOMImplementation 5
DOMStringList 3
DOMStringMap 4
DOMTokenList 9
Element 60
ElementInternals 1
ErrorEvent 7
Event 23
EventTarget 8
HashChangeEvent 2
History 9
HTMLAnchorElement 12
HTMLAreaElement 12
HTMLBaseElement 4
HTMLButtonElement 9
HTMLCanvasElement 6
HTMLElement 16
HTMLFieldSetElement 1
HTMLFormElement 8
HTMLIFrameElement 14
HTMLImageElement 13
HTMLInputElement 34
HTMLLabelElement 2
HTMLLinkElement 18
HTMLMediaElement 24
HTMLMetaElement 6
HTMLObjectElement 1
HTMLOptionElement 11
HTMLOutputElement 1
HTMLProgressElement 5
HTMLScriptElement 18
HTMLSelectElement 10
HTMLStyleElement 4
HTMLTableElement 17
HTMLTableRowElement 5
HTMLTableSectionElement 3
HTMLTemplateElement 1
HTMLTextAreaElement 20
IDBCursor 13
IDBDatabase 15
IDBFactory 3
IDBIndex 8
IDBObjectStore 14
IDBOpenDBRequest 4
IDBRequest 11
IDBTransaction 16
IDBVersionChangeEvent 4
ImageBitmap 3
ImageData 1
InputEvent 6
KeyboardEvent 14
KeyframeEffect 12
Location 20
MediaQueryList 6
MediaQueryListEvent 4
MessageChannel 3
MessageEvent 11
MessagePort 10
MouseEvent 18
MutationObserver 5
MutationRecord 9
NamedNodeMap 8
Node 32
NodeIterator 8
OffscreenCanvas 8
OffscreenCanvasRenderingContext2D 1
Path2D 2
Performance 9
PerformanceEntry 4
PerformanceMark 3
PerformanceMeasure 1
PointerEvent 14
PopStateEvent 2
ProcessingInstruction 1
ProgressEvent 5
ResizeObserver 5
ResizeObserverEntry 5
ResizeObserverSize 2
Screen 6
ShadowRoot 2
Storage 10
StorageEvent 8
StyleSheet 7
StyleSheetList 2
Text 4
TextDecoder 6
TextEncoder 3
TreeWalker 12
UIEvent 6
URL 30
URLSearchParams 11
WebSocket 18
WheelEvent 6
Window 68
Worker 10
WorkerGlobalScope 15
WorkerLocation 9
XPathEvaluator 4
XPathExpression 1
XPathResult 9