mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00: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()
|
||||
}
|
||||
|
||||
// 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
|
||||
fn GetCurrentTarget(&self) -> Option<DomRoot<EventTarget>> {
|
||||
self.current_target.get()
|
||||
|
|
|
@ -11,6 +11,7 @@ interface Event {
|
|||
[Pure]
|
||||
readonly attribute DOMString type;
|
||||
readonly attribute EventTarget? target;
|
||||
readonly attribute EventTarget? srcElement;
|
||||
readonly attribute EventTarget? currentTarget;
|
||||
|
||||
const unsigned short NONE = 0;
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
[Event-defaultPrevented-after-dispatch.html]
|
||||
[Default prevention via preventDefault]
|
||||
expected: FAIL
|
||||
|
||||
[Default prevention via returnValue]
|
||||
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]
|
||||
expected: FAIL
|
||||
|
||||
[calls `handleEvent` method of `EventListener`]
|
||||
expected: FAIL
|
||||
|
||||
[throws if `handleEvent` is falsy and not callable]
|
||||
expected: FAIL
|
||||
|
||||
[throws if `handleEvent` is thruthy and not callable]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -827,27 +827,18 @@
|
|||
[DOM IDL tests]
|
||||
expected: FAIL
|
||||
|
||||
[Event interface: attribute srcElement]
|
||||
expected: FAIL
|
||||
|
||||
[Event interface: operation composedPath()]
|
||||
expected: FAIL
|
||||
|
||||
[Event interface: attribute composed]
|
||||
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]
|
||||
expected: FAIL
|
||||
|
||||
[Event interface: document.createEvent("Event") must inherit property "composed" with the proper type]
|
||||
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]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -857,9 +848,6 @@
|
|||
[CustomEvent interface: operation initCustomEvent(DOMString, boolean, boolean, any)]
|
||||
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]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue