This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23601 - Define a variable to replace "with prejudice"
Summary: Define a variable to replace "with prejudice"
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebSocket API (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-23 06:00 UTC by Takeshi Yoshino
Modified: 2013-11-19 21:15 UTC (History)
3 users (show)

See Also:


Attachments

Description Takeshi Yoshino 2013-10-23 06:00:25 UTC
The definition of close with prejudice is not straightforward. Sometimes it takes minutes to interpret it.

I suggest that we replace

> If the user agent was required to fail the WebSocket connection or the WebSocket connection is closed with prejudice, fire a simple event named error at the WebSocket object. [WSP]

into

> If the user agent was required to fail the WebSocket connection or the closed with prejudice flag is true, fire a simple event named error at the WebSocket object. [WSP]

and insert this text

> When it is said to close the WebSocket connection with prejudice, run these steps:
> - Set the closed with prejudice flag.
> - close the WebSocket connection

and put occurrences of "close the WebSocket connection with prejudice" in the send() definition into an anchor pointing the new text.
Comment 1 Ian 'Hixie' Hickson 2013-10-23 19:08:22 UTC
I don't really understand how that would change.

"with prejudice" is already hyperlinked to the relevant part of the spec. The term is only used four times. It basically already is a flag (actually, an argument).

Can you elaborate on what is confusing?
Comment 2 Takeshi Yoshino 2013-10-24 02:26:56 UTC
Yes, after clicking the link and thinking a bit, I can understand that. But at least for me and another (English native), the link looked weird ("hmm, this text is also referring to the WebSocket connection is closed with prejudice. where's the actual definition...?") and tried to find explicit definition of close the WebSocket connection with prejudice that could be placed somewhere else.

Just adding "flag" to "prejudice" is also fine. When I was reading a text in DOM Promises spec that is using "synchronous flag", I didn't find it confusing.
Comment 3 Ian 'Hixie' Hickson 2013-10-25 23:34:53 UTC
Yeah, maybe I'm just being too cute here, and it's hurting the readability. I can look into changing the term to something else.
Comment 4 contributor 2013-11-19 21:15:47 UTC
Checked in as WHATWG revision r8298.
Check-in comment: Reword the concept of closing a WebSocket with prejudice so that it's more obviously a flag
http://html5.org/tools/web-apps-tracker?from=8297&to=8298