wasm-bindgen/crates/js-sys/tests/wasm/main.rs
Michael Hoffmann f5f541337c Create bindings for RegExp (#580)
* Create bindings for RegExp

* Address review comments

- Split the constructor into two: `new` and `new_regexp`. This way we
  can write RegExp::new("foo", "g") rather than
  RegExp::new(&JsValue::from("foo"), "g").

- The js_name for the setter for lastIndex should be `lastIndex` and
  not `set_lastIndex`. But fixing this causes a panic. Remove the
  method for now.
2018-07-29 16:13:42 -07:00

36 lines
636 B
Rust
Executable File

#![cfg(target_arch = "wasm32")]
#![feature(use_extern_macros)]
#![allow(non_snake_case)]
extern crate js_sys;
extern crate wasm_bindgen;
extern crate wasm_bindgen_test;
pub mod global_fns;
pub mod Array;
pub mod ArrayBuffer;
pub mod ArrayIterator;
pub mod Boolean;
pub mod DataView;
pub mod Date;
pub mod Error;
pub mod Function;
pub mod Generator;
pub mod Intl;
pub mod JsString;
pub mod Map;
pub mod MapIterator;
pub mod Math;
pub mod Number;
pub mod Object;
pub mod Proxy;
pub mod Reflect;
pub mod RegExp;
pub mod Set;
pub mod SetIterator;
pub mod Symbol;
pub mod TypedArray;
pub mod WeakMap;
pub mod WeakSet;
pub mod WebAssembly;