MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / eachElementWithSameWasmOff

Function eachElementWithSameWasmOff

crates/explorer/src/index.js:127–136  ·  view source on GitHub ↗
(event, closure)

Source from the content-addressed store, hash-verified

125);
126
127const eachElementWithSameWasmOff = (event, closure) => {
128 let offset = event.target.dataset.wasmOffset;
129 if (offset !== null) {
130 // Run the loop inside an animation frame. Since we're modifying the DOM,
131 // do so when the browser has some breathing room.
132 window.requestAnimationFrame(() => {
133 linkedElementCache.get(offset).forEach(closure);
134 });
135 }
136};
137
138const linkElements = element => {
139 element.addEventListener(

Callers 1

linkElementsFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected