mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
implement historical srcElement attribute for Event interface
This commit is contained in:
parent
e81af16de8
commit
d721dcbd45
7 changed files with 6 additions and 27 deletions
|
@ -263,6 +263,11 @@ impl EventMethods for Event {
|
||||||
self.target.get()
|
self.target.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://dom.spec.whatwg.org/#dom-event-srcelement
|
||||||
|
fn GetSrcElement(&self) -> Option<DomRoot<EventTarget>> {
|
||||||
|
self.target.get()
|
||||||
|
}
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#dom-event-currenttarget
|
// https://dom.spec.whatwg.org/#dom-event-currenttarget
|
||||||
fn GetCurrentTarget(&self) -> Option<DomRoot<EventTarget>> {
|
fn GetCurrentTarget(&self) -> Option<DomRoot<EventTarget>> {
|
||||||
self.current_target.get()
|
self.current_target.get()
|
||||||
|
|
|
@ -11,6 +11,7 @@ interface Event {
|
||||||
[Pure]
|
[Pure]
|
||||||
readonly attribute DOMString type;
|
readonly attribute DOMString type;
|
||||||
readonly attribute EventTarget? target;
|
readonly attribute EventTarget? target;
|
||||||
|
readonly attribute EventTarget? srcElement;
|
||||||
readonly attribute EventTarget? currentTarget;
|
readonly attribute EventTarget? currentTarget;
|
||||||
|
|
||||||
const unsigned short NONE = 0;
|
const unsigned short NONE = 0;
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
[Event-defaultPrevented-after-dispatch.html]
|
[Event-defaultPrevented-after-dispatch.html]
|
||||||
[Default prevention via preventDefault]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Default prevention via returnValue]
|
[Default prevention via returnValue]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[Event-dispatch-detached-click.html]
|
|
||||||
[Click event can be dispatched to an element that is not in the document.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[Event-dispatch-other-document.html]
|
|
||||||
[Custom event on an element in another document]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -5,12 +5,8 @@
|
||||||
[throws if `handleEvent` is not callable]
|
[throws if `handleEvent` is not callable]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[calls `handleEvent` method of `EventListener`]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[throws if `handleEvent` is falsy and not callable]
|
[throws if `handleEvent` is falsy and not callable]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[throws if `handleEvent` is thruthy and not callable]
|
[throws if `handleEvent` is thruthy and not callable]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -827,27 +827,18 @@
|
||||||
[DOM IDL tests]
|
[DOM IDL tests]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Event interface: attribute srcElement]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Event interface: operation composedPath()]
|
[Event interface: operation composedPath()]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Event interface: attribute composed]
|
[Event interface: attribute composed]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Event interface: document.createEvent("Event") must inherit property "srcElement" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Event interface: document.createEvent("Event") must inherit property "composedPath()" with the proper type]
|
[Event interface: document.createEvent("Event") must inherit property "composedPath()" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Event interface: document.createEvent("Event") must inherit property "composed" with the proper type]
|
[Event interface: document.createEvent("Event") must inherit property "composed" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Event interface: new Event("foo") must inherit property "srcElement" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Event interface: new Event("foo") must inherit property "composedPath()" with the proper type]
|
[Event interface: new Event("foo") must inherit property "composedPath()" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -857,9 +848,6 @@
|
||||||
[CustomEvent interface: operation initCustomEvent(DOMString, boolean, boolean, any)]
|
[CustomEvent interface: operation initCustomEvent(DOMString, boolean, boolean, any)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Event interface: new CustomEvent("foo") must inherit property "srcElement" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Event interface: new CustomEvent("foo") must inherit property "composedPath()" with the proper type]
|
[Event interface: new CustomEvent("foo") must inherit property "composedPath()" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue