The new "transferable" algorithm allows an invoker to determine if a BufferSource can be detached without errors before invoking transfer. This is particularly helpful if several buffers are processed in a batch, as the validity of the operation can be determined up front, rather than during processing which could leave the buffers in a mix of states.
See discussion in [1]. A local copy of the algorithm was landed as [2] (as "detachable") but this seems like a useful addition to WebIDL.
The new "transferable" algorithm allows an invoker to determine if a BufferSource can be detached without errors before invoking transfer. This is particularly helpful if several buffers are processed in a batch, as the validity of the operation can be determined up front, rather than during processing which could leave the buffers in a mix of states.
See discussion in [1]. A local copy of the algorithm was landed as [2] (as "detachable") but this seems like a useful addition to WebIDL.
1: https://github.com/webmachinelearning/webnn/issues/351 2: https://webmachinelearning.github.io/webnn/#buffersource-detachable
Eliding the checklist since this is a helper algorithm not new functionality, but please ask if more details are desired
Preview | Diff