commit af85daf1633c45001a5df3488e2eecbc225635ef
parent e7f3154ebb00e8ecc71a5604853aeef906eea65f
Author: Joey Arhar <jarhar@chromium.org>
Date: Thu, 9 Oct 2025 20:32:26 +0000
Bug 1992134 [wpt PR 55143] - Add source to ToggleEventInit, a=testonly
Automatic update from web-platform-tests
Add source to ToggleEventInit
This was missed when I implemented the ToggleEvent.source property. Spec
PR: https://github.com/whatwg/html/pull/11679
Bug: 408018828
Change-Id: I3f9a9616405a97596e8501aa729d9ce48e2c410f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6997772
Reviewed-by: Keith Cirkel <keithamus@gmail.com>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1522997}
--
wpt-commits: 22f6646fe6f18886570729d6474b6c5ab21e2c39
wpt-pr: 55143
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/testing/web-platform/tests/html/semantics/popovers/toggleevent-interface.html b/testing/web-platform/tests/html/semantics/popovers/toggleevent-interface.html
@@ -156,6 +156,13 @@ test(function() {
}, "ToggleEventInit properties set value 4");
test(function() {
+ const div = document.createElement('div');
+ const eventInit = {source: div};
+ const event = new ToggleEvent('beforetoggle', eventInit);
+ assert_equals(event.source, div);
+}, 'ToggleEventInit with source.');
+
+test(function() {
var event = new ToggleEvent("test", {newState: "sample"});
assert_equals(event.newState, "sample");
}, "newState set to 'sample'");