Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement EventListenerOptions for EventTarget #15803
Conversation
highfive
commented
Mar 2, 2017
|
Heads up! This PR modifies the following files: |
highfive
commented
Mar 2, 2017
|
It's not. In #12952 (comment) @Ms2ger mentions we only want to support the |
|
So you want me to comment all |
|
I don't understand the question. I want: dictionary EventListenerOptions {
boolean capture = false;
};
dictionary AddEventListenerOptions : EventListenerOptions {
// boolean passive = false;
// boolean once = false;
}; |
|
Ok, makes more sense. I thought you were only speaking of the usage, not the declaration. |
|
@GuillaumeGomez ping |
|
Sorry, was busy because of rustdoc. Will finish it this week-end. |
|
Updated. |
| capture: bool, | ||
| passive: bool, | ||
| once: bool, | ||
| removed: bool, |
This comment has been minimized.
This comment has been minimized.
nox
Mar 19, 2017
Member
Don't add fields for which we don't support the corresponding thing, so just add capture.
|
Updated. |
| capture: bool, | ||
| // passive: bool, | ||
| // once: bool, | ||
| // removed: bool, |
This comment has been minimized.
This comment has been minimized.
| capture: false, | ||
| // passive: false, | ||
| // once: false, | ||
| // removed: false, |
This comment has been minimized.
This comment has been minimized.
| (false, false, false) | ||
| } | ||
| AddEventListenerOptionsOrBoolean::Boolean(o) => (o, false, false), | ||
| }; |
This comment has been minimized.
This comment has been minimized.
nox
Mar 21, 2017
Member
let capture = match options {
AddEventListenerOptionsOrBoolean::AddEventListenerOptions(options) => options.capture,
AddEventListenerOptionsOrBoolean::Boolean(capture) => capture,
};| Vacant(entry) => entry.insert(EventListeners(vec!())), | ||
| }; | ||
| options: AddEventListenerOptionsOrBoolean) { | ||
| if let Some(listener) = listener { |
This comment has been minimized.
This comment has been minimized.
| capture: capture, | ||
| // passive: passive, | ||
| // once: once, | ||
| // removed: false, |
This comment has been minimized.
This comment has been minimized.
| phase: phase, | ||
| listener: EventListenerType::Additive(listener.clone()) | ||
| options: EventListenerOptionsOrBoolean) { | ||
| if let Some(ref listener) = listener { |
This comment has been minimized.
This comment has been minimized.
| @@ -225,7 +228,11 @@ impl CompiledEventListener { | |||
| /// A listener in a collection of event listeners. | |||
| struct EventListenerEntry { | |||
| phase: ListenerPhase, | |||
| listener: EventListenerType | |||
| listener: EventListenerType, | |||
| capture: bool, | |||
This comment has been minimized.
This comment has been minimized.
nox
Mar 21, 2017
Member
This new field is useless for now, given phase already covers it, please remove.
| capture: capture, | ||
| // passive: false, | ||
| // once: false, | ||
| // removed: false, |
This comment has been minimized.
This comment has been minimized.
|
Updated. |
|
@bors-servo try |
Implement EventListenerOptions for EventTarget It still needs to update tests and confirm that the code is the one expected. Reopening of #12952. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15803) <!-- Reviewable:end -->
|
|
|
All tests are failing with errors like:
|
|
@GuillaumeGomez Are you planning to return to this? |
|
Yes, I'm currently working on it (slowly but still). |
|
Actually I'm completely stuck in here and I have no idea what change broke everything. If anyone could help, it'd very appreciated! |
|
|
|
Superseded by #18612. Thanks for your contribution! |
GuillaumeGomez commentedMar 2, 2017
•
edited by larsbergstrom
It still needs to update tests and confirm that the code is the one expected. Reopening of #12952.
This change is