--- wsapi.html 2012-07-10 22:38:35.000000000 +0100 +++ ws.html 2012-07-11 19:20:05.712293700 +0100 @@ -507,7 +507,7 @@
WebSocket interface[Constructor(DOMString url, optional (DOMString or DOMString[]) protocols)] -interface WebSocket : EventTarget { +interface WebSocket : EventTarget { readonly attribute DOMString url; // ready state @@ -519,23 +519,23 @@ readonly attribute unsigned long bufferedAmount; // networking - attribute EventHandler onopen; - attribute EventHandler onerror; - attribute EventHandler onclose; + attribute EventHandler onopen; + attribute EventHandler onerror; + attribute EventHandler onclose; readonly attribute DOMString extensions; readonly attribute DOMString protocol; void close([Clamp] optional unsigned short code, optional DOMString reason); // messaging - attribute EventHandler onmessage; + attribute EventHandler onmessage; attribute DOMString binaryType; void send(DOMString data); void send(ArrayBufferView data); - void send(Blob data); + void send(Blob data); };
The WebSocket(url, protocols)
- constructor takes one or two arguments. The first argument, url, specifies the URL to which to
+ constructor takes one or two arguments. The first argument, url, specifies the URL to which to
connect. The second, protocols, if present, is
either a string or an array of strings. If it is a string, it is
equivalent to an array consisting of just that string; if it is
@@ -555,7 +555,7 @@
SyntaxError exception and abort these steps. [WSP]
If secure is false but the
- origin of the entry script has a scheme
+ origin of the entry script has a scheme
component that is itself a secure protocol, e.g. HTTPS, then throw
a SecurityError exception.
Let origin be the ASCII serialization of the - origin of the entry script, - converted to ASCII lowercase.
Return a new WebSocket object, and continue
these steps in the background (without blocking scripts).
This constructor must be visible when the script's global
- object is either a Window object or an object
+
This constructor must be visible when the script's global
+ object is either a Window object or an object
implementing the WorkerUtils interface.
The url
attribute must return the result of resolving the URL that was passed to the
+ url">resolving the URL that was passed to the
constructor. (It doesn't matter what it is resolved relative to,
- since we already know it is an absolute URL.)
The readyState
attribute represents the state of the connection. It can have the
@@ -792,7 +792,7 @@
The bufferedAmount
attribute must return the number of bytes of application data (UTF-8
text and binary data) that have been queued using send() but that, as of the last
- time the event loop started executing a task, had not yet been transmitted to
+ time the event loop started executing a task, had not yet been transmitted to
the network. (This thus includes any text sent during the execution
of the current task, regardless of whether the user agent is able to
transmit text asynchronously with script execution.) This does not
@@ -920,12 +920,12 @@
-
The following are the event handlers (and their - corresponding event handler - event types) that must be supported, as IDL attributes, by +
The following are the event handlers (and their
+ corresponding event handler
+ event types) that must be supported, as IDL attributes, by
all objects implementing the WebSocket interface:
| Event handler | Event handler event type
+
5 Feedback from the protocolWhen the WebSocket connection is established, the user - agent must queue a task to run these steps: + agent must queue a task to run these steps:
WebSocket() constructor. [COOKIES] [RFC3629] [WSP]
- When a WebSocket message has been received with type type and data data, the user - agent must queue a task to follow these steps: [WSP] + agent must queue a task to follow these steps: [WSP]
8 Event definitions[Constructor(DOMString type, optional CloseEventInit eventInitDict)] -interface CloseEvent : Event { +interface CloseEvent : Event { readonly attribute boolean wasClean; readonly attribute unsigned short code; readonly attribute DOMString reason; }; -dictionary CloseEventInit : EventInit { +dictionary CloseEventInit : EventInit { boolean wasClean; unsigned short code; DOMString reason; @@ -1185,19 +1185,19 @@ |
|---|