mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-08 21:28:07 +00:00
Closer to finished
- Tried `cargo doc` and seen methods generated. - Added test with a few method calls to the console operations.
This commit is contained in:
parent
0d897e9b8d
commit
a23fa03ad0
9
crates/web-sys/tests/wasm/console.rs
Normal file
9
crates/web-sys/tests/wasm/console.rs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
use wasm_bindgen_test::*;
|
||||||
|
use wasm_bindgen::prelude::*;
|
||||||
|
use web_sys::console;
|
||||||
|
|
||||||
|
#[wasm_bindgen_test]
|
||||||
|
fn test_console() {
|
||||||
|
console::time("test label");
|
||||||
|
console::time_end("test label");
|
||||||
|
}
|
@ -14,6 +14,7 @@ pub mod anchor_element;
|
|||||||
pub mod body_element;
|
pub mod body_element;
|
||||||
pub mod br_element;
|
pub mod br_element;
|
||||||
pub mod button_element;
|
pub mod button_element;
|
||||||
|
pub mod console;
|
||||||
pub mod div_element;
|
pub mod div_element;
|
||||||
pub mod element;
|
pub mod element;
|
||||||
pub mod event;
|
pub mod event;
|
||||||
|
@ -36,7 +36,7 @@ use std::path::Path;
|
|||||||
|
|
||||||
use backend::TryToTokens;
|
use backend::TryToTokens;
|
||||||
use backend::defined::{ImportedTypeDefinitions, RemoveUndefinedImports};
|
use backend::defined::{ImportedTypeDefinitions, RemoveUndefinedImports};
|
||||||
use backend::util::{ident_ty, rust_ident, wrap_import_function};
|
use backend::util::{ident_ty, rust_ident, raw_ident, wrap_import_function};
|
||||||
use failure::ResultExt;
|
use failure::ResultExt;
|
||||||
use heck::{ShoutySnakeCase, SnakeCase};
|
use heck::{ShoutySnakeCase, SnakeCase};
|
||||||
use proc_macro2::{Ident, Span};
|
use proc_macro2::{Ident, Span};
|
||||||
@ -892,7 +892,7 @@ impl<'src> WebidlParse<'src, NamespaceNames<'src>> for weedle::namespace::Operat
|
|||||||
|
|
||||||
let import = backend::ast::Import {
|
let import = backend::ast::Import {
|
||||||
module: None,
|
module: None,
|
||||||
js_namespace: Some(ns_names.js_name.clone()),
|
js_namespace: Some(raw_ident(ns_names.js_name)),
|
||||||
kind: backend::ast::ImportKind::Function(imported_fn),
|
kind: backend::ast::ImportKind::Function(imported_fn),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user