Skip to content

Editorial: Use WebIDL constructor operation in Overview.md #32

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions proposals/js-types/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,17 @@ Types can be queried by adding the following methods to the API.

* Overload constructor [Memory](https://webassembly.github.io/spec/js-api/index.html#memories) (see above)
```WebIDL
Constructor(MemoryType or InitialMemoryType type)
constructor(MemoryType or InitialMemoryType type);
```

* Overload constructor [Table](https://webassembly.github.io/spec/js-api/index.html#tables) (see above)
```WebIDL
Constructor(TableType or InitialTableType type)
constructor(TableType or InitialTableType type);
```

* Adjust constructor [Global](https://github.com/WebAssembly/mutable-global/blob/master/proposals/mutable-global/Overview.md#webassemblyglobal-objects) to accept a GlobalType and its initialisation value separately:
```WebIDL
Constructor(GlobalType type, any value)
constructor(GlobalType type, any value);
```


Expand All @@ -151,8 +151,9 @@ Concretely, the change is the following:

* Introduce a new class `WebAssembly.Function` that is a subclass of `Function` as follows
```WebIDL
[LegacyNamespace=WebAssembly, Constructor(FunctionType type, function func), Exposed=(Window,Worker,Worklet)]
[LegacyNamespace=WebAssembly, Exposed=(Window,Worker,Worklet)]
interface Function : global.Function {
constructor(FunctionType type, function func);
FunctionType type();
};
```
Expand Down