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

Dispatch mozbrowsershowmodalprompt event for alert() #8352

Closed
jdm opened this issue Nov 5, 2015 · 3 comments
Closed

Dispatch mozbrowsershowmodalprompt event for alert() #8352

jdm opened this issue Nov 5, 2015 · 3 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Nov 5, 2015

When browser.html is using servo, it wants to intercept calls like window.alert('foo') and show its own prompt, instead of relying on Servo's default behaviour. We need to implement the part of the Browsing API related to this, by creating a CustomEvent that matches the specification and dispatching that in Window::Alert. dispatch_mozbrowser_event in htmliframeelement.rs is a good model for this.

Code: components/script/dom/window.rs

@jdm
Copy link
Member Author

@jdm jdm commented Nov 5, 2015

Actually, my initial suggestion for solving this wasn't correct. We should add any required information to the ShowModalPrompt enum variant in constellation_msg.rs, then use the trigger_mozbrowser_event API on Document to ensure we dispatch the DOM event at the right place.

@simartin
Copy link
Contributor

@simartin simartin commented Nov 9, 2015

I'd like to give it a try; I guess I should use a js::jsapi::JSObject to represent the "detail" property, correct?

@jdm
Copy link
Member Author

@jdm jdm commented Nov 9, 2015

For that, we should build on the changes in #8347.

@jdm jdm added the C-assigned label Nov 23, 2015
bors-servo added a commit that referenced this issue Dec 9, 2015
Issue #8352: Dispatch mozbrowsershowmodalprompt event for alert().

Fixes #8352

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8863)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Dec 11, 2015
Issue #8352: Dispatch mozbrowsershowmodalprompt event for alert().

Fixes #8352

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8863)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Dec 13, 2015
Issue #8352: Dispatch mozbrowsershowmodalprompt event for alert().

Fixes #8352

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8863)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Dec 19, 2015
Issue #8352: Dispatch mozbrowsershowmodalprompt event for alert().

Fixes #8352

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8863)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Dec 20, 2015
Issue #8352: Dispatch mozbrowsershowmodalprompt event for alert().

Fixes #8352

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8863)
<!-- Reviewable:end -->
jrmuizel pushed a commit to jrmuizel/gecko-cinnabar that referenced this issue Jun 12, 2017
…event for alert() (from simartin:issue_8352); r=jdm

Fixes servo/servo#8352

Source-Repo: https://github.com/servo/servo
Source-Revision: 9a4d82c314754d377edb0ef6b87873076bf3c057
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 1, 2019
…event for alert() (from simartin:issue_8352); r=jdm

Fixes servo/servo#8352

Source-Repo: https://github.com/servo/servo
Source-Revision: 9a4d82c314754d377edb0ef6b87873076bf3c057

UltraBlame original commit: c8ab22fa8b0a219bc367bf11cdc756bad82e2eef
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…event for alert() (from simartin:issue_8352); r=jdm

Fixes servo/servo#8352

Source-Repo: https://github.com/servo/servo
Source-Revision: 9a4d82c314754d377edb0ef6b87873076bf3c057

UltraBlame original commit: c8ab22fa8b0a219bc367bf11cdc756bad82e2eef
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
…event for alert() (from simartin:issue_8352); r=jdm

Fixes servo/servo#8352

Source-Repo: https://github.com/servo/servo
Source-Revision: 9a4d82c314754d377edb0ef6b87873076bf3c057

UltraBlame original commit: c8ab22fa8b0a219bc367bf11cdc756bad82e2eef
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.

None yet
2 participants
You can’t perform that action at this time.