Privatize Event

This commit is contained in:
Tim Taubert 2014-10-13 10:43:24 +02:00
parent 28061b1c91
commit cd9de05088
8 changed files with 95 additions and 39 deletions

View file

@ -128,7 +128,7 @@ impl<'a> EventTargetHelpers for JSRef<'a, EventTarget> {
fn dispatch_event_with_target(self,
target: Option<JSRef<EventTarget>>,
event: JSRef<Event>) -> Fallible<bool> {
if event.dispatching.get() || !event.initialized.get() {
if event.dispatching() || !event.initialized() {
return Err(InvalidState);
}
Ok(dispatch_event(self, target, event))