Skip to content

Commit

Permalink
Bug 1566698 [wpt PR 17869] - Create an attribute and property for toa…
Browse files Browse the repository at this point in the history
…st closebutton and attach close functionality, a=testonly

Automatic update from web-platform-tests
Create an attribute and property for toast closebutton and attach close functionality

This change sets the groundwork for the toast closebutton, by
adding an attribute to set the closebutton content,
creating a closeButton property to reflect that attribute,
and adding an event listener to close the toast when the closebutton is pressed.

This change implements the close button API described in
(https://github.com/jackbsteinberg/std-toast/blob/eec7728f7082a897d777181ac07b0448062ffca5/README.md),
and is the subject of debate on issue #48 on the explainer here
jackbsteinberg/std-toast#48.

Future CLs will add the closeButton option for showToast
(https://github.com/jackbsteinberg/std-toast/tree/master#showtoastmessage-options)
Link: https://chromium-review.googlesource.com/c/chromium/src/+/1706453

Bug: 972945
Change-Id: I5d6c3055791a9f93ef414e575e128c61e2a944ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1699269
Reviewed-by: Fergal Daly <fergalchromium.org>
Reviewed-by: Kent Tamura <tkentchromium.org>
Commit-Queue: Jack Steinberg <jacksteinbergchromium.org>
Cr-Commit-Position: refs/heads/master{#678530}

--

wpt-commits: bd0b2bff5361391e8c25949aa40f3167dd82d572
wpt-pr: 17869

UltraBlame original commit: 8930d78b9176fc46cc05bc4f0f3f1465128d1da1
  • Loading branch information
marco-c committed Oct 4, 2019
1 parent d5fda6e commit 84325ac
Show file tree
Hide file tree
Showing 2 changed files with 609 additions and 0 deletions.
3 changes: 3 additions & 0 deletions testing/web-platform/tests/std-toast/attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,9 @@
'
action
'
'
closeButton
'
]
;
assert_array_equals
Expand Down
Loading

0 comments on commit 84325ac

Please sign in to comment.