mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Implement From<DOMString> for Atom
This commit is contained in:
parent
f7fb035188
commit
0adfb08089
20 changed files with 44 additions and 38 deletions
|
@ -96,7 +96,7 @@ impl Event {
|
|||
init: &EventBinding::EventInit) -> Fallible<Root<Event>> {
|
||||
let bubbles = if init.bubbles { EventBubbles::Bubbles } else { EventBubbles::DoesNotBubble };
|
||||
let cancelable = if init.cancelable { EventCancelable::Cancelable } else { EventCancelable::NotCancelable };
|
||||
Ok(Event::new(global, Atom::from(&*type_), bubbles, cancelable))
|
||||
Ok(Event::new(global, Atom::from(type_), bubbles, cancelable))
|
||||
}
|
||||
|
||||
pub fn init_event(&self, type_: Atom, bubbles: bool, cancelable: bool) {
|
||||
|
@ -240,7 +240,7 @@ impl EventMethods for Event {
|
|||
type_: DOMString,
|
||||
bubbles: bool,
|
||||
cancelable: bool) {
|
||||
self.init_event(Atom::from(&*type_), bubbles, cancelable)
|
||||
self.init_event(Atom::from(type_), bubbles, cancelable)
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-event-istrusted
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue