Skip to content

Commit

Permalink
Align the API with the standardized WebIDL
Browse files Browse the repository at this point in the history
Historically some browsers (i.e. Gecko) returned a boolean from the
send method to indicate whether the message was successfully
buffered and/or sent. The modern specification specifies a void
return type [1] which is how it is implemented in modern browsers.

[1] https://html.spec.whatwg.org/multipage/web-sockets.html#the-websocket-interface

Closes #3252.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237832178
  • Loading branch information
realityforge authored and blickly committed Mar 11, 2019
1 parent 179d294 commit 3d80e2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion externs/browser/html5.js
Expand Up @@ -2998,7 +2998,7 @@ WebSocket.prototype.onclose;
/**
* Transmits data using the connection.
* @param {string|ArrayBuffer|ArrayBufferView} data
* @return {boolean}
* @return {void}
*/
WebSocket.prototype.send = function(data) {};

Expand Down
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/resources.json

Large diffs are not rendered by default.

0 comments on commit 3d80e2a

Please sign in to comment.