Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement window.closed #16705

Closed
cbrewster opened this issue May 3, 2017 · 3 comments
Closed

Implement window.closed #16705

cbrewster opened this issue May 3, 2017 · 3 comments

Comments

@cbrewster
Copy link
Member

@cbrewster cbrewster commented May 3, 2017

To implement window.closed, we should call window.maybe_browsing_context(). If that is None, then the browsing context has been discarded and true should be returned. If it is Some() it should check BrowsingContext::is_discarded().

spec: https://html.spec.whatwg.org/multipage/browsers.html#dom-window-closed
files: components/script/dom/window.rs components/script/dom/webidls/window.webidl components/script/dom/browsingcontext.rs

@synlestidae
Copy link

@synlestidae synlestidae commented May 18, 2017

@highfive assign me

@highfive
Copy link

@highfive highfive commented May 18, 2017

Hey @synlestidae! Thanks for your interest in working on this issue. It's now assigned to you!

@highfive highfive added the C-assigned label May 18, 2017
@synlestidae synlestidae mentioned this issue May 18, 2017
4 of 5 tasks complete
@synlestidae
Copy link

@synlestidae synlestidae commented May 18, 2017

Figured this is a good first contribution. Not that this depends on it, but will implementing window.closed be useful before #13241? Or #13997? Are there any cases in which window.closed is true in Servo?

bors-servo added a commit that referenced this issue May 18, 2017
Implement window.closed

<!-- Please describe your changes on the following line: -->

Implements #16705. window.closed should evaluate to true if BrowsingContext is discarded

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16705 (github issue number if applicable).

<!-- Either: -->
- [X] 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/16920)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue May 26, 2017
Implement window.closed

<!-- Please describe your changes on the following line: -->

Implements #16705. window.closed should evaluate to true if BrowsingContext is discarded

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #16705 (github issue number if applicable).

<!-- Either: -->
- [X] 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/16920)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.