Skip to content

Commit

Permalink
Fixed SpeechRecognition to be an EventTarget
Browse files Browse the repository at this point in the history
Closes #2987

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207574715
  • Loading branch information
phistuck authored and tjgq committed Aug 7, 2018
1 parent 22baa3e commit 2de240a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions externs/browser/w3c_speech.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,21 @@ HTMLInputElement.prototype.onwebkitspeechchange;
// W3C Web Speech API implemented in Chrome M23
/**
* @constructor
* @implements {EventTarget}
*/
function SpeechRecognition() {}

/** @override */
SpeechRecognition.prototype.addEventListener =
function(type, listener, opt_options) {};

/** @override */
SpeechRecognition.prototype.removeEventListener =
function(type, listener, opt_options) {};

/** @override */
SpeechRecognition.prototype.dispatchEvent = function(evt) {};

/** @type {SpeechGrammarList} */
SpeechRecognition.prototype.grammars;

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 2de240a

Please sign in to comment.