-
Notifications
You must be signed in to change notification settings - Fork 22.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add page types for the WebAssembly section #27737
Conversation
This seems worth talking about. In the JS docs we have the page-types So, this would introduce a third way of dealing with namespaces. Ideally, we agree on one way to have page-types for namespaces ... See also the discussion in BCD mdn/browser-compat-data#20114 |
Unless I'm misreading this:
...it doesn't mean There is an issue here though I think. If the WebAssembly JS docs were still in JavaScript I would probably have made But if Or, since https://github.com/orgs/mdn/discussions/151 suggests that they are more like Web APIs, would it be better to borrow page types from Web/API instead? |
Thanks Will. I think I am +1 on treating this like a Web API. Note that Web APIs have no namespace page type and whether they should is discussed in mdn/browser-compat-data#20114. If we assume Web APIs get no "namespace" page-type, then I think it would be like this: WebAssembly: For statics, I guess |
They should definitely be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming and (config) changes LGTM, but I defer to those with more context to align on final names. Prefixing these types with webassembly-
sounds like a good idea to me.
This adds page types for WebAssembly. I tried to stay as close as possible as the Web APIs page types for the JS API. There are also
guide
andlanding-page
, as well aswebassembly-instruction
for the pages with opcodes.webassembly-function
: a global function, that is a method directly under theWebAssembly
object that acts as a namespace, likeWebAssembly.instantiate()
.webassembly-constructor
: a constructor, likeWebAssembly.Exception()
.webassembly-interface
: a WebAssembly interface, likeWebAssembly.LinkError
.webassembly-instance-property
: an instance property, likeWebAssembly.Instance.exports
.webassembly-instance-method
: an instance method, likeWebAssembly.Exception.getArg()
.webassembly-static-method
: a static method, likeWebAssembly.Module.exports()
.webassembly-instruction
: an instruction, or a set of instructions, likeWrap
.This is a part of openwebdocs/project#91