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

Updating prompt handling during user script to be consistent #1248

Merged
merged 2 commits into from Apr 10, 2018

Conversation

jimevans
Copy link
Contributor

@jimevans jimevans commented Apr 4, 2018

NOTE This PR is intended to spark discussion. It touches on at least two issues already filed against the spec (#1153 and #1135), and should be considered, since user prompt handlers was largely removed from the Level 1 specification.

Section 18 of the spec states that, "When a user prompt appears, it is
the task of the subsequent command to handle it." The algorithm for
"Executing a function body" (Section 15.2) violates this statement,
insisting that the user prompt handler be invoked during the current
command, rather than by the subsequent command. Instead, we should
immediately abort the execute[Async]Script command, and let the subsequent
command handle the user prompt, if any.


Preview | Diff

Section 18 of the spec states that, "When a user prompt appears, it is
the task of the subsequent command to handle it." The algorithm for
"Executing a function body" (Section 15.2) violates this statement,
insisting that the user prompt handler be invoked during the current
command, rather than by the subsequent command. Instead, we should
immediately abort the execute[Async]Script command, and let the subsequent
command handle the user prompt, if any.
@@ -1,4 +1,4 @@
<!doctype html>
<!doctype html>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can’t tell from the raw patch what has actually changed here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s probably the UTF-8 byte marker from the editor I was using, since it’s at the very beginning of the file. I can fix that up if need be, I suppose.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we don’t want a BOM there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in subsequent commit.

andreastt
andreastt previously approved these changes Apr 10, 2018
Copy link
Member

@andreastt andreastt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems OK with me.

Copy link
Member

@andreastt andreastt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test required.

@jimevans
Copy link
Contributor Author

Test PR located at web-platform-tests/wpt#10401

@andreastt
Copy link
Member

Spec change and tests look good to me, but it would be good if someone from another vendor and an editor would look at this before continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants