mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
implement composition event creation in Document.createEvent
This commit is contained in:
parent
250184fe60
commit
de939eb96d
4 changed files with 18 additions and 42 deletions
|
@ -21,6 +21,21 @@ pub struct CompositionEvent {
|
|||
}
|
||||
|
||||
impl CompositionEvent {
|
||||
pub fn new_inherited() -> CompositionEvent {
|
||||
CompositionEvent {
|
||||
uievent: UIEvent::new_inherited(),
|
||||
data: DOMString::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_uninitialized(window: &Window) -> DomRoot<CompositionEvent> {
|
||||
reflect_dom_object(
|
||||
Box::new(CompositionEvent::new_inherited()),
|
||||
window,
|
||||
CompositionEventBinding::Wrap,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn new(
|
||||
window: &Window,
|
||||
type_: DOMString,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue