diff --git a/index.bs b/index.bs index 53acd0b6..4f4be8c2 100644 --- a/index.bs +++ b/index.bs @@ -474,6 +474,31 @@ interface ML { }; +The {{ML/createContext()}} method steps are: +1. If the [=responsible document=] is not [=allowed to use=] the [=webnn-feature|webnn=] feature, then throw a "{{SecurityError!!exception}}" {{DOMException}} and abort these steps. +1. Let |context| be a new {{MLContext}} object. +1. Switch on the method's first argument: +
webnn
".
+Its default allowlist is 'self'
.
+
## MLContext ## {#api-mlcontext}
The {{MLContext}} interface represents a global state of neural network compute workload and execution processes.
+The context type for an {{MLContext}} is either "default
", "webgl
" or "webgpu
".
+
## MLOperandDescriptor ## {#api-mloperanddescriptor}