Skip to content

Updating prompt handling during user script to be consistent - #1248

Merged
AutomatedTester merged 2 commits into
w3c:masterfrom
jimevans:script-unhandled-user-prompt
Apr 10, 2018
Merged

AutomatedTester merged 2 commits into
w3c:masterfrom
jimevans:script-unhandled-user-prompt

Conversation

@jimevans

@jimevans jimevans commented Apr 4, 2018 •

Copy link
Copy Markdown
Contributor

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.
Comment thread webdriver-spec.html Outdated
@@ -1,4 +1,4 @@
<!doctype html>
<!doctype html>

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@andreastt andreastt left a comment

Copy link
Copy Markdown
Member

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.

@andreastt andreastt left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor Author

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

@andreastt

Copy link
Copy Markdown
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.

3 participants