diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-05-07 13:22:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-07 13:22:23 -0400 |
commit | 1d8283e01059710737f55531e777a4f19adb6f9e (patch) | |
tree | 1466d8d62367c5d641436b5c568db500a80b5a0e /components/script_traits/script_msg.rs | |
parent | dc17b32cebc956385084288765c9f5a78e60ee28 (diff) | |
parent | 29d1cf6270b56af65971f27af4aa47c549eef788 (diff) | |
download | servo-1d8283e01059710737f55531e777a4f19adb6f9e.tar.gz servo-1d8283e01059710737f55531e777a4f19adb6f9e.zip |
Auto merge of #20329 - gterzian:before_unload, r=cbrewster
Implement beforeunload event and infrastructure
<!-- Please describe your changes on the following line: -->
Implementation of:
1. https://html.spec.whatwg.org/multipage/#prompt-to-unload-a-document, and
2. https://html.spec.whatwg.org/multipage/#unload-a-document
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #10787 and fix #20485 and fix #20588 and fix #20496 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/20329)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script_traits/script_msg.rs')
-rw-r--r-- | components/script_traits/script_msg.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/components/script_traits/script_msg.rs b/components/script_traits/script_msg.rs index e8c26c3cf2f..b14d162320d 100644 --- a/components/script_traits/script_msg.rs +++ b/components/script_traits/script_msg.rs @@ -145,6 +145,8 @@ pub enum ScriptMsg { TouchEventProcessed(EventResult), /// A log entry, with the top-level browsing context id and thread name LogEntry(Option<String>, LogEntry), + /// Discard the document. + DiscardDocument, /// Notifies the constellation that this pipeline has exited. PipelineExited, /// Send messages from postMessage calls from serviceworker |