mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Auto merge of #22917 - ksqsf:master, r=KiChjang
Add optional annotations for initEvent method of Event interface Added `optional` and default values to parameters `bubbles` and `cancelable` of `initEvent` of `Event`. I tried to update test results, but there seem to be no differences at all. I checked similar code where `optional` is used, and there seems to be no special handling in Rust. If that is not the case with this issue, please let me know and I'll commit more follow-ups. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22883 <!-- Either: --> - [x] There are tests for these changes OR <!-- 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/22917) <!-- Reviewable:end -->
This commit is contained in:
commit
42ebf46172
3 changed files with 1 additions and 7 deletions
|
@ -35,7 +35,7 @@ interface Event {
|
|||
[Constant]
|
||||
readonly attribute DOMTimeStamp timeStamp;
|
||||
|
||||
void initEvent(DOMString type, boolean bubbles, boolean cancelable);
|
||||
void initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false);
|
||||
};
|
||||
|
||||
dictionary EventInit {
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
[Calling initEvent must unset the stop propagation flag.]
|
||||
expected: FAIL
|
||||
|
||||
[Tests initEvent's default parameter values.]
|
||||
expected: FAIL
|
||||
|
||||
[Properties of initEvent(type, true, true)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -878,9 +878,6 @@
|
|||
[Event interface: attribute composed]
|
||||
expected: FAIL
|
||||
|
||||
[Event interface: operation initEvent(DOMString, boolean, boolean)]
|
||||
expected: FAIL
|
||||
|
||||
[Event interface: document.createEvent("Event") must inherit property "srcElement" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue