The WebIDL spec recommends algorithmic method steps for defining operations: https://heycam.github.io/webidl/#method-steps
This spec currently uses a WebGPU spec inspired convention that differs from this best practice. We should consider adopting the "method steps" convention.
(Here's one example of method steps in context of the WebNN API spec:
https://webmachinelearning.github.io/webnn/#dom-ml-createcontext)