From ad3cf91ca66fb3dccc926233dfa7185aa47eda0e Mon Sep 17 00:00:00 2001 From: Jatinder Mann Date: Tue, 7 Jan 2014 16:04:19 -0800 Subject: [PATCH] - Defined sendBeacon on WorkerNavigator interface - URLMismatchError replaced with SyntaxError - Errors only discussed in processing model to avoid duplicates - Removed note and added MAY clause allowing UA to prioritize beacons to lower than other network traffic. - Forbid HTTP authorization prompts due to a beacon - Removed SyntaxError due to data parameter being null; removed ? in definition --- index.html | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/index.html b/index.html index d0f99b3..e7325c4 100644 --- a/index.html +++ b/index.html @@ -46,7 +46,7 @@

Beacon

-

Editor's Draft December 14, 2013

+

Editor's Draft January 7, 2014

This version:
4.2 sendBeacon partial interface Navigator { - boolean sendBeacon(DOMString url, (ArrayBufferView or Blob or DOMString or FormData)? data); + boolean sendBeacon(DOMString url, (ArrayBufferView or Blob or DOMString or FormData) data); +}; + +partial interface WorkerNavigator { + boolean sendBeacon(DOMString url, (ArrayBufferView or Blob or DOMString or FormData) data); };

- The sendBeacon method MUST asynchronously transmit data provided by the data parameter to the resolved URL provided by the url parameter. The User Agent MUST use the POST HTTP method to fetch the url for transmitting the data. All relevant cookie headers MUST be included in the request. User agents MUST honor the HTTP headers (including, in particular, redirects and HTTP cookie headers), but MUST ignore any entity bodies returned in the response. User agents MAY close the connection prematurely once they start receiving an entity body. The User Agent SHOULD transmit data at the earliest available opportunity. The User Agent SHOULD make a best effort attempt to eventually transmit the data. + The sendBeacon method MUST asynchronously transmit data provided by the data parameter to the resolved URL provided by the url parameter. The User Agent MUST use the POST HTTP method to fetch the url for transmitting the data. All relevant cookie headers MUST be included in the request. User agents MUST honor the HTTP headers (including, in particular, redirects and HTTP cookie headers), but MUST ignore any entity bodies returned in the response. User agents MAY close the connection prematurely once they start receiving an entity body. The User Agent SHOULD transmit data at the earliest available opportunity, but MAY prioritize the transmission of data lower compared to other network traffic. The User Agent SHOULD make a best effort attempt to eventually transmit the data. To avoid the target confusion security risk, the User Agent MUST NOT display HTTP authorization prompts as a result of a sendBeacon method call.

-
-
Note
-

- The User Agent should transmit the data at the earliest opportunity, but may prioritize the transmission of data lower compared to other network traffic. -

-
- -

Parameters

url

The url parameter indicates the resolved URL - where the data is to be transmitted. The User Agent MUST throw the - URLMismatchError exception - if the URL cannot be resolved. + where the data is to be transmitted.

data

@@ -298,7 +292,6 @@

data

The data parameter is the ArrayBufferView, Blob, DOMString, or FormData data that is to be transmitted. - The User Agent MUST throw the SyntaxError is data is null.

@@ -311,9 +304,9 @@

data

Note

- If the user agent limits the amount of data that can be queued to be sent using this API and the size of + If the User Agent limits the amount of data that can be queued to be sent using this API and the size of data causes that limit to be exceeded, this method returns false. A return value of true - implies the browser has queued the data for transfer. But since the actual data + implies the browser has queued the data for transfer. However, since the actual data transfer happens asynchronously, this method does not provide any information whether the data transfer has succeeded or not. The actual data transfer may occur after the page has unloaded. To be still an effective mechanism for @@ -380,12 +373,8 @@

4.3 Processing Modelurl relative to base. If the algorithm returns an error, throw a - "URLMismatchError" exception and terminate - these steps. - -
  • If data is null, throw a "SyntaxError" exception and terminate - these steps.

    + these steps.
  • If the user agent limits the amount of data that can be queued to be sent using this API and the size of data causes that limit to be exceeded, terminate these steps and set the return value to false.