mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue