mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-24 18:21:33 +00:00
Make the slice argument of texImage2D and related functions immutable
This also adds immutable slice whitelisting for Uint8Array, ArrayBufferView, and BufferSource, and removes Uint8ArrayMut.
This commit is contained in:
@ -156,6 +156,11 @@ export function new_webgl_rendering_context() {
|
||||
return canvas.getContext('webgl');
|
||||
}
|
||||
|
||||
export function new_webgl2_rendering_context() {
|
||||
const canvas = document.createElement('canvas');
|
||||
return canvas.getContext('webgl2');
|
||||
}
|
||||
|
||||
export function new_xpath_result() {
|
||||
let xmlDoc = new DOMParser().parseFromString("<root><value>tomato</value></root>", "application/xml");
|
||||
let xpathResult = xmlDoc.evaluate("/root//value", xmlDoc, null, XPathResult.ANY_TYPE, null);
|
||||
|
Reference in New Issue
Block a user