Skip to content

Fixed issue with import/export statements.#3

Open
Domratchev wants to merge 2 commits into
anteloe:masterfrom
Domratchev:master
Open

Fixed issue with import/export statements.#3
Domratchev wants to merge 2 commits into
anteloe:masterfrom
Domratchev:master

Conversation

@Domratchev

Copy link
Copy Markdown

No description provided.

Comment thread index.js
@@ -1,12 +1,15 @@
export { SpeechRecognition } from './js/src/SpeechRecognition';

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's wrong with the re-export?

Comment thread index.js
navigator.mediaDevices.getUserMedia = navigator.mediaDevices.getUserMedia || (function () {
// returns a getUserMedia function
var getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
let getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file is not included in the transpilation process. A polyfill should support older browsers and not all support let for variable declarations.

Comment thread index.js
// polyfill speechRecognition
(function (speechRecognition) {
window.SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition || SpeechRecognition;
window.SpeechRecognition = speechRecognition || SpeechRecognition;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is correct. thanks :) 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants