Wren

Module highlight

What the CSS Custom Highlight API has registered (CSS.highlights), for the painter: the objects are native/js/odin/web_highlight.js, which sends the whole registry again after a change, in a microtask (src/page/highlights.odin).

Exposed to: Window. Source: api/highlight.widl.

Odin: import "wren:highlight".

Functions

Highlights_clear

void Highlights_clear()

The registry starts over, empty.

Host: Highlights_clear :: proc(c: ^Call)

Highlights_add

void Highlights_add(string name, i32 priority)

A registered highlight, the one the next Highlights_addRange calls fill.

Host: Highlights_add :: proc(c: ^Call, name: string, priority: i32)

Highlights_addRange

void Highlights_addRange(Node start, u32 start_offset, Node end, u32 end_offset)

A range of the last highlight added. One of another document is left out.

Host: Highlights_addRange :: proc(c: ^Call, start: Api_Node, start_offset: u32, end: Api_Node, end_offset: u32)

Edit this page on GitHub