wasm-bindgen/crates/webidl-tests/no_interface.js
Alex Crichton 01a52233d3 Support [NoInterfaceObject] in web-sys
This commit enables `[NoInterfaceObject]` annotated interfaces in
`web-sys`. The `NoInterfaceObject` attribute means that there's not
actually a JS class for the object, but all of its properties and such
can still be accessed structually and invoked. This should help provide
more bindings for some more common types on the web!

Note that this builds on recent features to ensure that `dyn_into` and
friends always fail for `NoInterfaceObject` objects because they don't
actually have a class.

Closes #893
Closes #1257
Closes #1315
2019-04-15 10:36:01 -07:00

9 lines
119 B
JavaScript

global.GetNoInterfaceObject = class {
static get() {
return {
number: 3,
foo: () => {},
}
}
};