1 use wasm_bindgen::prelude::*;
2 use wasm_bindgen_test::*;
3 use web_sys::HtmlSlotElement;
4 
5 #[wasm_bindgen(module = "/tests/wasm/element.js")]
6 extern "C" {
new_slot() -> HtmlSlotElement7     fn new_slot() -> HtmlSlotElement;
8 }
9 
10 #[wasm_bindgen_test]
test_slot_element()11 fn test_slot_element() {
12     let _slot = new_slot();
13     // TODO: Test fails in Firefox, but not in Chrome.  Error in Firefox is 'ReferenceError: HTMLSlotElement is not defined'.  https://w3c-test.org/shadow-dom/HTMLSlotElement-interface.html
14     // slot.set_name("root_separator");
15     // assert_eq!(slot.name(), "root_separator", "Slot name should 'root_separator'.");
16 }
17