mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Implement the "progressevent" argument to Document::createEvent
This commit is contained in:
parent
81f6e70a62
commit
889579c6de
4 changed files with 14 additions and 24 deletions
|
@ -11,6 +11,7 @@ use dom::bindings::inheritance::Castable;
|
|||
use dom::bindings::js::Root;
|
||||
use dom::bindings::reflector::reflect_dom_object;
|
||||
use dom::event::{Event, EventBubbles, EventCancelable};
|
||||
use dom::window::Window;
|
||||
use string_cache::Atom;
|
||||
use util::str::DOMString;
|
||||
|
||||
|
@ -31,6 +32,11 @@ impl ProgressEvent {
|
|||
total: total
|
||||
}
|
||||
}
|
||||
pub fn new_uninitialized(window: &Window) -> Root<ProgressEvent> {
|
||||
reflect_dom_object(box ProgressEvent::new_inherited(false, 0, 0),
|
||||
GlobalRef::Window(window),
|
||||
ProgressEventBinding::Wrap)
|
||||
}
|
||||
pub fn new(global: GlobalRef, type_: Atom,
|
||||
can_bubble: EventBubbles, cancelable: EventCancelable,
|
||||
length_computable: bool, loaded: u64, total: u64) -> Root<ProgressEvent> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue