mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-05-02 09:02:16 +00:00
* Create a new `web-sys` crate This will eventually contain all the WebIDL-generated bindings to Web APIs. * ci: Test the new `web-sys` crate in CI * web-sys: Add a small README * web-sys: Vendor all the WebIDL files from mozilla-central * backend: Add a pass to remove AST items that use undefined imports This is necessary for the WebIDL frontend, which can't translate many WebIDL constructs into equivalent wasm-bindgen AST things yet. It lets us make incremental progress: we can generate bindings to methods we can support right now even though there might be methods on the same interface that we can't support yet. * webidl: Add a bunch of missing semicolons * webidl: Make parsing private It was only `pub` so that we could test it, but we ended up moving towards integration tests rather than unit tests that assert particular ASTs are parsed from WebIDL files. * webidl: Remove uses of undefined import types * test-project-builder: Build projects in "very verbose" mode This helps for debugging failing WebIDL-related tests. * test-project-builder: Add more profiling timers * test-project-builder: Detect when webpack-dev-server fails Instead of going into an infinite loop, detect when webpack-dev-server fails to start up and early exit the test. * webidl: Specify version for dev-dependency on wasm-bindgen-backend Instead of only a relative path. * guide: Add section about contributing to `web-sys` * WIP enable Event.webidl Still need to fix and finish the test. * Update expected webidl output * Start out a test's status as incomplete That way if we don't fill it in the error message doesn't look quite so bizarre * Fix onerror function in headless mode Otherwise we don't see any output! * Fix package.json/node_modules handling in project generation Make sure these are looked up in the git project root rather than the crate root * Avoid logging body text This was meant for debugging and is otherwise pretty noisy * Fix a relative path * More expected test fixes * Fix a typo * test-project-builder: Allow asynchronous tests * webidl: Convert [Unforgeable] attributes into `#[wasm_bindgen(structural)]` Fixes #432 * test-project-builder: Print generated WebIDL bindings for debugging purposes Helps debug bad WebIDL bindings generation inside tests. * When we can't find a descriptor, say which one can't be found This helps when debugging things that need to become structural. * web-sys: Test bindings for Event * ci: Use `--manifest-path dir` instead of `cd dir && ...` * web-sys: Just move .webidl files isntead of symlinking to enable them * tests: Polyfill Array.prototype.values for older browsers in CI * test-project-builder: Don't panic on poisoned headless test mutex We only use it to serialize headless tests so that we don't try to bind the port concurrently. Its OK to run another headless test if an earlier one panicked. * JsValue: Add {is,as}_{object,function} methods Allows dynamically casting values to `js::Object` and `js::Function`. * tidy: Fix whitespace and missing semicolons * Allow for dynamic feature detection of methods If we create bindings to a method that doesn't exist in this implementation, then it shouldn't fail until if/when we actually try and invoke that missing method. * tests: Do feature detection in Array.prototype.values test * Add JsValue::{is_string, as_js_string} methods And document all the cast/convert/check methods for js value. * eslint: allow backtick string literals * Only generate a fallback import function for non-structural imports
587 lines
24 KiB
Rust
587 lines
24 KiB
Rust
#[allow(bad_style)]
|
|
pub struct Event {
|
|
obj: ::wasm_bindgen::JsValue,
|
|
}
|
|
impl ::wasm_bindgen::describe::WasmDescribe for Event {
|
|
fn describe() {
|
|
::wasm_bindgen::JsValue::describe();
|
|
}
|
|
}
|
|
impl ::wasm_bindgen::convert::IntoWasmAbi for Event {
|
|
type Abi = <::wasm_bindgen::JsValue as ::wasm_bindgen::convert::IntoWasmAbi>::Abi;
|
|
fn into_abi(self, extra: &mut ::wasm_bindgen::convert::Stack) -> Self::Abi {
|
|
self.obj.into_abi(extra)
|
|
}
|
|
}
|
|
impl ::wasm_bindgen::convert::FromWasmAbi for Event {
|
|
type Abi = <::wasm_bindgen::JsValue as ::wasm_bindgen::convert::FromWasmAbi>::Abi;
|
|
unsafe fn from_abi(js: Self::Abi, extra: &mut ::wasm_bindgen::convert::Stack) -> Self {
|
|
Event {
|
|
obj: ::wasm_bindgen::JsValue::from_abi(js, extra),
|
|
}
|
|
}
|
|
}
|
|
impl<'a> ::wasm_bindgen::convert::IntoWasmAbi for &'a Event {
|
|
type Abi = <&'a ::wasm_bindgen::JsValue as ::wasm_bindgen::convert::IntoWasmAbi>::Abi;
|
|
fn into_abi(self, extra: &mut ::wasm_bindgen::convert::Stack) -> Self::Abi {
|
|
(&self.obj).into_abi(extra)
|
|
}
|
|
}
|
|
impl ::wasm_bindgen::convert::RefFromWasmAbi for Event {
|
|
type Abi = <::wasm_bindgen::JsValue as ::wasm_bindgen::convert::RefFromWasmAbi>::Abi;
|
|
type Anchor = ::wasm_bindgen::__rt::core::mem::ManuallyDrop<Event>;
|
|
unsafe fn ref_from_abi(
|
|
js: Self::Abi,
|
|
extra: &mut ::wasm_bindgen::convert::Stack,
|
|
) -> Self::Anchor {
|
|
let tmp =
|
|
<::wasm_bindgen::JsValue as ::wasm_bindgen::convert::RefFromWasmAbi>::ref_from_abi(
|
|
js, extra,
|
|
);
|
|
::wasm_bindgen::__rt::core::mem::ManuallyDrop::new(Event {
|
|
obj: ::wasm_bindgen::__rt::core::mem::ManuallyDrop::into_inner(tmp),
|
|
})
|
|
}
|
|
}
|
|
impl From<::wasm_bindgen::JsValue> for Event {
|
|
fn from(obj: ::wasm_bindgen::JsValue) -> Event {
|
|
Event { obj }
|
|
}
|
|
}
|
|
impl From<Event> for ::wasm_bindgen::JsValue {
|
|
fn from(obj: Event) -> ::wasm_bindgen::JsValue {
|
|
obj.obj
|
|
}
|
|
}
|
|
#[no_mangle]
|
|
#[allow(non_snake_case)]
|
|
#[doc(hidden)]
|
|
pub extern "C" fn __wbindgen_describe___widl_f_event_phase_Event() {
|
|
use wasm_bindgen::describe::*;
|
|
inform(FUNCTION);
|
|
inform(1u32);
|
|
<&Event as WasmDescribe>::describe();
|
|
inform(1);
|
|
<u16 as WasmDescribe>::describe();
|
|
}
|
|
impl Event {
|
|
#[allow(bad_style)]
|
|
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
|
pub fn event_phase(&self) -> u16 {
|
|
::wasm_bindgen::__rt::link_this_library();
|
|
#[wasm_import_module = "__wbindgen_placeholder__"]
|
|
extern "C" {
|
|
fn __widl_f_event_phase_Event(
|
|
self_: <&Event as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
) -> <u16 as ::wasm_bindgen::convert::FromWasmAbi>::Abi;
|
|
}
|
|
unsafe {
|
|
let _ret = {
|
|
let mut __stack = ::wasm_bindgen::convert::GlobalStack::new();
|
|
let self_ =
|
|
<&Event as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(self, &mut __stack);
|
|
__widl_f_event_phase_Event(self_)
|
|
};
|
|
<u16 as ::wasm_bindgen::convert::FromWasmAbi>::from_abi(
|
|
_ret,
|
|
&mut ::wasm_bindgen::convert::GlobalStack::new(),
|
|
)
|
|
}
|
|
}
|
|
#[allow(bad_style, unused_variables)]
|
|
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
|
|
pub fn event_phase(&self) -> u16 {
|
|
panic!(
|
|
"cannot call wasm-bindgen imported functions on \
|
|
non-wasm targets"
|
|
);
|
|
}
|
|
}
|
|
#[no_mangle]
|
|
#[allow(non_snake_case)]
|
|
#[doc(hidden)]
|
|
pub extern "C" fn __wbindgen_describe___widl_f_stop_propagation_Event() {
|
|
use wasm_bindgen::describe::*;
|
|
inform(FUNCTION);
|
|
inform(1u32);
|
|
<&Event as WasmDescribe>::describe();
|
|
inform(0);
|
|
}
|
|
impl Event {
|
|
#[allow(bad_style)]
|
|
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
|
pub fn stop_propagation(&self) {
|
|
::wasm_bindgen::__rt::link_this_library();
|
|
#[wasm_import_module = "__wbindgen_placeholder__"]
|
|
extern "C" {
|
|
fn __widl_f_stop_propagation_Event(
|
|
self_: <&Event as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
) -> ();
|
|
}
|
|
unsafe {
|
|
let _ret = {
|
|
let mut __stack = ::wasm_bindgen::convert::GlobalStack::new();
|
|
let self_ =
|
|
<&Event as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(self, &mut __stack);
|
|
__widl_f_stop_propagation_Event(self_)
|
|
};
|
|
()
|
|
}
|
|
}
|
|
#[allow(bad_style, unused_variables)]
|
|
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
|
|
pub fn stop_propagation(&self) {
|
|
panic!(
|
|
"cannot call wasm-bindgen imported functions on \
|
|
non-wasm targets"
|
|
);
|
|
}
|
|
}
|
|
#[no_mangle]
|
|
#[allow(non_snake_case)]
|
|
#[doc(hidden)]
|
|
pub extern "C" fn __wbindgen_describe___widl_f_stop_immediate_propagation_Event() {
|
|
use wasm_bindgen::describe::*;
|
|
inform(FUNCTION);
|
|
inform(1u32);
|
|
<&Event as WasmDescribe>::describe();
|
|
inform(0);
|
|
}
|
|
impl Event {
|
|
#[allow(bad_style)]
|
|
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
|
pub fn stop_immediate_propagation(&self) {
|
|
::wasm_bindgen::__rt::link_this_library();
|
|
#[wasm_import_module = "__wbindgen_placeholder__"]
|
|
extern "C" {
|
|
fn __widl_f_stop_immediate_propagation_Event(
|
|
self_: <&Event as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
) -> ();
|
|
}
|
|
unsafe {
|
|
let _ret = {
|
|
let mut __stack = ::wasm_bindgen::convert::GlobalStack::new();
|
|
let self_ =
|
|
<&Event as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(self, &mut __stack);
|
|
__widl_f_stop_immediate_propagation_Event(self_)
|
|
};
|
|
()
|
|
}
|
|
}
|
|
#[allow(bad_style, unused_variables)]
|
|
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
|
|
pub fn stop_immediate_propagation(&self) {
|
|
panic!(
|
|
"cannot call wasm-bindgen imported functions on \
|
|
non-wasm targets"
|
|
);
|
|
}
|
|
}
|
|
#[no_mangle]
|
|
#[allow(non_snake_case)]
|
|
#[doc(hidden)]
|
|
pub extern "C" fn __wbindgen_describe___widl_f_bubbles_Event() {
|
|
use wasm_bindgen::describe::*;
|
|
inform(FUNCTION);
|
|
inform(1u32);
|
|
<&Event as WasmDescribe>::describe();
|
|
inform(1);
|
|
<bool as WasmDescribe>::describe();
|
|
}
|
|
impl Event {
|
|
#[allow(bad_style)]
|
|
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
|
pub fn bubbles(&self) -> bool {
|
|
::wasm_bindgen::__rt::link_this_library();
|
|
#[wasm_import_module = "__wbindgen_placeholder__"]
|
|
extern "C" {
|
|
fn __widl_f_bubbles_Event(
|
|
self_: <&Event as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
) -> <bool as ::wasm_bindgen::convert::FromWasmAbi>::Abi;
|
|
}
|
|
unsafe {
|
|
let _ret = {
|
|
let mut __stack = ::wasm_bindgen::convert::GlobalStack::new();
|
|
let self_ =
|
|
<&Event as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(self, &mut __stack);
|
|
__widl_f_bubbles_Event(self_)
|
|
};
|
|
<bool as ::wasm_bindgen::convert::FromWasmAbi>::from_abi(
|
|
_ret,
|
|
&mut ::wasm_bindgen::convert::GlobalStack::new(),
|
|
)
|
|
}
|
|
}
|
|
#[allow(bad_style, unused_variables)]
|
|
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
|
|
pub fn bubbles(&self) -> bool {
|
|
panic!(
|
|
"cannot call wasm-bindgen imported functions on \
|
|
non-wasm targets"
|
|
);
|
|
}
|
|
}
|
|
#[no_mangle]
|
|
#[allow(non_snake_case)]
|
|
#[doc(hidden)]
|
|
pub extern "C" fn __wbindgen_describe___widl_f_cancelable_Event() {
|
|
use wasm_bindgen::describe::*;
|
|
inform(FUNCTION);
|
|
inform(1u32);
|
|
<&Event as WasmDescribe>::describe();
|
|
inform(1);
|
|
<bool as WasmDescribe>::describe();
|
|
}
|
|
impl Event {
|
|
#[allow(bad_style)]
|
|
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
|
pub fn cancelable(&self) -> bool {
|
|
::wasm_bindgen::__rt::link_this_library();
|
|
#[wasm_import_module = "__wbindgen_placeholder__"]
|
|
extern "C" {
|
|
fn __widl_f_cancelable_Event(
|
|
self_: <&Event as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
) -> <bool as ::wasm_bindgen::convert::FromWasmAbi>::Abi;
|
|
}
|
|
unsafe {
|
|
let _ret = {
|
|
let mut __stack = ::wasm_bindgen::convert::GlobalStack::new();
|
|
let self_ =
|
|
<&Event as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(self, &mut __stack);
|
|
__widl_f_cancelable_Event(self_)
|
|
};
|
|
<bool as ::wasm_bindgen::convert::FromWasmAbi>::from_abi(
|
|
_ret,
|
|
&mut ::wasm_bindgen::convert::GlobalStack::new(),
|
|
)
|
|
}
|
|
}
|
|
#[allow(bad_style, unused_variables)]
|
|
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
|
|
pub fn cancelable(&self) -> bool {
|
|
panic!(
|
|
"cannot call wasm-bindgen imported functions on \
|
|
non-wasm targets"
|
|
);
|
|
}
|
|
}
|
|
#[no_mangle]
|
|
#[allow(non_snake_case)]
|
|
#[doc(hidden)]
|
|
pub extern "C" fn __wbindgen_describe___widl_f_prevent_default_Event() {
|
|
use wasm_bindgen::describe::*;
|
|
inform(FUNCTION);
|
|
inform(1u32);
|
|
<&Event as WasmDescribe>::describe();
|
|
inform(0);
|
|
}
|
|
impl Event {
|
|
#[allow(bad_style)]
|
|
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
|
pub fn prevent_default(&self) {
|
|
::wasm_bindgen::__rt::link_this_library();
|
|
#[wasm_import_module = "__wbindgen_placeholder__"]
|
|
extern "C" {
|
|
fn __widl_f_prevent_default_Event(
|
|
self_: <&Event as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
) -> ();
|
|
}
|
|
unsafe {
|
|
let _ret = {
|
|
let mut __stack = ::wasm_bindgen::convert::GlobalStack::new();
|
|
let self_ =
|
|
<&Event as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(self, &mut __stack);
|
|
__widl_f_prevent_default_Event(self_)
|
|
};
|
|
()
|
|
}
|
|
}
|
|
#[allow(bad_style, unused_variables)]
|
|
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
|
|
pub fn prevent_default(&self) {
|
|
panic!(
|
|
"cannot call wasm-bindgen imported functions on \
|
|
non-wasm targets"
|
|
);
|
|
}
|
|
}
|
|
#[no_mangle]
|
|
#[allow(non_snake_case)]
|
|
#[doc(hidden)]
|
|
pub extern "C" fn __wbindgen_describe___widl_f_default_prevented_Event() {
|
|
use wasm_bindgen::describe::*;
|
|
inform(FUNCTION);
|
|
inform(1u32);
|
|
<&Event as WasmDescribe>::describe();
|
|
inform(1);
|
|
<bool as WasmDescribe>::describe();
|
|
}
|
|
impl Event {
|
|
#[allow(bad_style)]
|
|
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
|
pub fn default_prevented(&self) -> bool {
|
|
::wasm_bindgen::__rt::link_this_library();
|
|
#[wasm_import_module = "__wbindgen_placeholder__"]
|
|
extern "C" {
|
|
fn __widl_f_default_prevented_Event(
|
|
self_: <&Event as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
) -> <bool as ::wasm_bindgen::convert::FromWasmAbi>::Abi;
|
|
}
|
|
unsafe {
|
|
let _ret = {
|
|
let mut __stack = ::wasm_bindgen::convert::GlobalStack::new();
|
|
let self_ =
|
|
<&Event as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(self, &mut __stack);
|
|
__widl_f_default_prevented_Event(self_)
|
|
};
|
|
<bool as ::wasm_bindgen::convert::FromWasmAbi>::from_abi(
|
|
_ret,
|
|
&mut ::wasm_bindgen::convert::GlobalStack::new(),
|
|
)
|
|
}
|
|
}
|
|
#[allow(bad_style, unused_variables)]
|
|
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
|
|
pub fn default_prevented(&self) -> bool {
|
|
panic!(
|
|
"cannot call wasm-bindgen imported functions on \
|
|
non-wasm targets"
|
|
);
|
|
}
|
|
}
|
|
#[no_mangle]
|
|
#[allow(non_snake_case)]
|
|
#[doc(hidden)]
|
|
pub extern "C" fn __wbindgen_describe___widl_f_composed_Event() {
|
|
use wasm_bindgen::describe::*;
|
|
inform(FUNCTION);
|
|
inform(1u32);
|
|
<&Event as WasmDescribe>::describe();
|
|
inform(1);
|
|
<bool as WasmDescribe>::describe();
|
|
}
|
|
impl Event {
|
|
#[allow(bad_style)]
|
|
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
|
pub fn composed(&self) -> bool {
|
|
::wasm_bindgen::__rt::link_this_library();
|
|
#[wasm_import_module = "__wbindgen_placeholder__"]
|
|
extern "C" {
|
|
fn __widl_f_composed_Event(
|
|
self_: <&Event as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
) -> <bool as ::wasm_bindgen::convert::FromWasmAbi>::Abi;
|
|
}
|
|
unsafe {
|
|
let _ret = {
|
|
let mut __stack = ::wasm_bindgen::convert::GlobalStack::new();
|
|
let self_ =
|
|
<&Event as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(self, &mut __stack);
|
|
__widl_f_composed_Event(self_)
|
|
};
|
|
<bool as ::wasm_bindgen::convert::FromWasmAbi>::from_abi(
|
|
_ret,
|
|
&mut ::wasm_bindgen::convert::GlobalStack::new(),
|
|
)
|
|
}
|
|
}
|
|
#[allow(bad_style, unused_variables)]
|
|
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
|
|
pub fn composed(&self) -> bool {
|
|
panic!(
|
|
"cannot call wasm-bindgen imported functions on \
|
|
non-wasm targets"
|
|
);
|
|
}
|
|
}
|
|
#[no_mangle]
|
|
#[allow(non_snake_case)]
|
|
#[doc(hidden)]
|
|
pub extern "C" fn __wbindgen_describe___widl_f_is_trusted_Event() {
|
|
use wasm_bindgen::describe::*;
|
|
inform(FUNCTION);
|
|
inform(1u32);
|
|
<&Event as WasmDescribe>::describe();
|
|
inform(1);
|
|
<bool as WasmDescribe>::describe();
|
|
}
|
|
impl Event {
|
|
#[allow(bad_style)]
|
|
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
|
pub fn is_trusted(&self) -> bool {
|
|
::wasm_bindgen::__rt::link_this_library();
|
|
#[wasm_import_module = "__wbindgen_placeholder__"]
|
|
extern "C" {
|
|
fn __widl_f_is_trusted_Event(
|
|
self_: <&Event as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
) -> <bool as ::wasm_bindgen::convert::FromWasmAbi>::Abi;
|
|
}
|
|
unsafe {
|
|
let _ret = {
|
|
let mut __stack = ::wasm_bindgen::convert::GlobalStack::new();
|
|
let self_ =
|
|
<&Event as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(self, &mut __stack);
|
|
__widl_f_is_trusted_Event(self_)
|
|
};
|
|
<bool as ::wasm_bindgen::convert::FromWasmAbi>::from_abi(
|
|
_ret,
|
|
&mut ::wasm_bindgen::convert::GlobalStack::new(),
|
|
)
|
|
}
|
|
}
|
|
#[allow(bad_style, unused_variables)]
|
|
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
|
|
pub fn is_trusted(&self) -> bool {
|
|
panic!(
|
|
"cannot call wasm-bindgen imported functions on \
|
|
non-wasm targets"
|
|
);
|
|
}
|
|
}
|
|
#[no_mangle]
|
|
#[allow(non_snake_case)]
|
|
#[doc(hidden)]
|
|
pub extern "C" fn __wbindgen_describe___widl_f_init_event_Event() {
|
|
use wasm_bindgen::describe::*;
|
|
inform(FUNCTION);
|
|
inform(4u32);
|
|
<&Event as WasmDescribe>::describe();
|
|
<&str as WasmDescribe>::describe();
|
|
<bool as WasmDescribe>::describe();
|
|
<bool as WasmDescribe>::describe();
|
|
inform(0);
|
|
}
|
|
impl Event {
|
|
#[allow(bad_style)]
|
|
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
|
pub fn init_event(&self, type_: &str, bubbles: bool, cancelable: bool) {
|
|
::wasm_bindgen::__rt::link_this_library();
|
|
#[wasm_import_module = "__wbindgen_placeholder__"]
|
|
extern "C" {
|
|
fn __widl_f_init_event_Event(
|
|
self_: <&Event as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
type_: <&str as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
bubbles: <bool as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
cancelable: <bool as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
) -> ();
|
|
}
|
|
unsafe {
|
|
let _ret = {
|
|
let mut __stack = ::wasm_bindgen::convert::GlobalStack::new();
|
|
let self_ =
|
|
<&Event as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(self, &mut __stack);
|
|
let type_ =
|
|
<&str as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(type_, &mut __stack);
|
|
let bubbles =
|
|
<bool as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(bubbles, &mut __stack);
|
|
let cancelable = <bool as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(
|
|
cancelable,
|
|
&mut __stack,
|
|
);
|
|
__widl_f_init_event_Event(self_, type_, bubbles, cancelable)
|
|
};
|
|
()
|
|
}
|
|
}
|
|
#[allow(bad_style, unused_variables)]
|
|
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
|
|
pub fn init_event(&self, type_: &str, bubbles: bool, cancelable: bool) {
|
|
panic!(
|
|
"cannot call wasm-bindgen imported functions on \
|
|
non-wasm targets"
|
|
);
|
|
}
|
|
}
|
|
#[no_mangle]
|
|
#[allow(non_snake_case)]
|
|
#[doc(hidden)]
|
|
pub extern "C" fn __wbindgen_describe___widl_f_cancel_bubble_Event() {
|
|
use wasm_bindgen::describe::*;
|
|
inform(FUNCTION);
|
|
inform(1u32);
|
|
<&Event as WasmDescribe>::describe();
|
|
inform(1);
|
|
<bool as WasmDescribe>::describe();
|
|
}
|
|
impl Event {
|
|
#[allow(bad_style)]
|
|
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
|
pub fn cancel_bubble(&self) -> bool {
|
|
::wasm_bindgen::__rt::link_this_library();
|
|
#[wasm_import_module = "__wbindgen_placeholder__"]
|
|
extern "C" {
|
|
fn __widl_f_cancel_bubble_Event(
|
|
self_: <&Event as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
) -> <bool as ::wasm_bindgen::convert::FromWasmAbi>::Abi;
|
|
}
|
|
unsafe {
|
|
let _ret = {
|
|
let mut __stack = ::wasm_bindgen::convert::GlobalStack::new();
|
|
let self_ =
|
|
<&Event as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(self, &mut __stack);
|
|
__widl_f_cancel_bubble_Event(self_)
|
|
};
|
|
<bool as ::wasm_bindgen::convert::FromWasmAbi>::from_abi(
|
|
_ret,
|
|
&mut ::wasm_bindgen::convert::GlobalStack::new(),
|
|
)
|
|
}
|
|
}
|
|
#[allow(bad_style, unused_variables)]
|
|
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
|
|
pub fn cancel_bubble(&self) -> bool {
|
|
panic!(
|
|
"cannot call wasm-bindgen imported functions on \
|
|
non-wasm targets"
|
|
);
|
|
}
|
|
}
|
|
#[no_mangle]
|
|
#[allow(non_snake_case)]
|
|
#[doc(hidden)]
|
|
pub extern "C" fn __wbindgen_describe___widl_f_set_cancel_bubble_Event() {
|
|
use wasm_bindgen::describe::*;
|
|
inform(FUNCTION);
|
|
inform(2u32);
|
|
<&Event as WasmDescribe>::describe();
|
|
<bool as WasmDescribe>::describe();
|
|
inform(0);
|
|
}
|
|
impl Event {
|
|
#[allow(bad_style)]
|
|
#[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
|
|
pub fn set_cancel_bubble(&self, cancel_bubble: bool) {
|
|
::wasm_bindgen::__rt::link_this_library();
|
|
#[wasm_import_module = "__wbindgen_placeholder__"]
|
|
extern "C" {
|
|
fn __widl_f_set_cancel_bubble_Event(
|
|
self_: <&Event as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
cancel_bubble: <bool as ::wasm_bindgen::convert::IntoWasmAbi>::Abi,
|
|
) -> ();
|
|
}
|
|
unsafe {
|
|
let _ret = {
|
|
let mut __stack = ::wasm_bindgen::convert::GlobalStack::new();
|
|
let self_ =
|
|
<&Event as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(self, &mut __stack);
|
|
let cancel_bubble = <bool as ::wasm_bindgen::convert::IntoWasmAbi>::into_abi(
|
|
cancel_bubble,
|
|
&mut __stack,
|
|
);
|
|
__widl_f_set_cancel_bubble_Event(self_, cancel_bubble)
|
|
};
|
|
()
|
|
}
|
|
}
|
|
#[allow(bad_style, unused_variables)]
|
|
#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
|
|
pub fn set_cancel_bubble(&self, cancel_bubble: bool) {
|
|
panic!(
|
|
"cannot call wasm-bindgen imported functions on \
|
|
non-wasm targets"
|
|
);
|
|
}
|
|
}
|
|
#[allow(non_upper_case_globals)]
|
|
#[wasm_custom_section = "__wasm_bindgen_unstable"]
|
|
const __WASM_BINDGEN_GENERATED_wasm_bindgen_webidl_0_2_11_0 : [ u8 ; 3534usize ] = * b"\xCA\r\0\0{\"exports\":[],\"enums\":[],\"imports\":[{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"type\"}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_event_phase_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Getter\":\"eventPhase\"}}}},\"structural\":false,\"function\":{\"name\":\"eventPhase\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_stop_propagation_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":\"Regular\"}}},\"structural\":false,\"function\":{\"name\":\"stopPropagation\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_stop_immediate_propagation_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":\"Regular\"}}},\"structural\":false,\"function\":{\"name\":\"stopImmediatePropagation\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_bubbles_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Getter\":\"bubbles\"}}}},\"structural\":false,\"function\":{\"name\":\"bubbles\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_cancelable_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Getter\":\"cancelable\"}}}},\"structural\":false,\"function\":{\"name\":\"cancelable\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_prevent_default_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":\"Regular\"}}},\"structural\":false,\"function\":{\"name\":\"preventDefault\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_default_prevented_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Getter\":\"defaultPrevented\"}}}},\"structural\":false,\"function\":{\"name\":\"defaultPrevented\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_composed_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Getter\":\"composed\"}}}},\"structural\":false,\"function\":{\"name\":\"composed\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_is_trusted_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Getter\":\"isTrusted\"}}}},\"structural\":false,\"function\":{\"name\":\"isTrusted\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_init_event_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":\"Regular\"}}},\"structural\":false,\"function\":{\"name\":\"initEvent\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_cancel_bubble_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Getter\":\"cancelBubble\"}}}},\"structural\":false,\"function\":{\"name\":\"cancelBubble\"}}},{\"module\":null,\"version\":null,\"js_namespace\":null,\"kind\":{\"kind\":\"function\",\"shim\":\"__widl_f_set_cancel_bubble_Event\",\"catch\":false,\"method\":{\"class\":\"Event\",\"kind\":{\"Operation\":{\"is_static\":false,\"kind\":{\"Setter\":\"cancelBubble\"}}}},\"structural\":false,\"function\":{\"name\":\"set_cancelBubble\"}}}],\"structs\":[],\"version\":\"0.2.11 (fab125d6e)\",\"schema_version\":\"6\"}" ;
|