-
-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
374 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,65 @@ | ||
pub mod dom; | ||
use std::collections::HashMap; | ||
|
||
pub struct ShadowRoot { | ||
pub mode: ShadowRootMode, | ||
pub delegates_focus: bool, | ||
pub slot_assignment: SlotAssignmentMode, | ||
pub host: Box<Element>, | ||
// pub onslotchange: Option<EventHandler>, | ||
} | ||
|
||
pub enum SlotAssignmentMode { | ||
Manual, | ||
Named, | ||
} | ||
|
||
pub enum ShadowRootMode { | ||
Open, | ||
Closed, | ||
} | ||
|
||
pub struct Element { | ||
pub namespace_uri: Option<String>, | ||
pub prefix: Option<String>, | ||
pub local_name: String, | ||
pub tag_name: String, | ||
pub id: String, | ||
pub class_name: String, | ||
pub class_list: Vec<String>, | ||
pub slot: String, | ||
pub attributes: HashMap<String, String>, | ||
pub shadow_root: Option<Box<ShadowRoot>>, | ||
} | ||
|
||
pub struct HtmlElement { | ||
// Element fields | ||
pub namespace_uri: Option<String>, | ||
pub prefix: Option<String>, | ||
pub local_name: String, | ||
pub tag_name: String, | ||
pub id: String, | ||
pub class_name: String, | ||
pub class_list: Vec<String>, | ||
pub slot: String, | ||
pub attributes: HashMap<String, String>, | ||
pub shadow_root: Option<ShadowRoot>, | ||
|
||
// HTML Element | ||
pub title: String, | ||
pub lang: String, | ||
pub translate: bool, | ||
pub dir: String, | ||
|
||
pub hidden: Option<bool>, | ||
pub insert: bool, | ||
pub access_key: String, | ||
pub access_key_label: String, | ||
pub draggable: bool, | ||
pub spellcheck: bool, | ||
pub autocapitalize: String, | ||
|
||
pub inner_text: String, | ||
pub outer_text: String, | ||
|
||
pub popover: Option<String>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.