Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AudioContext and webkitAudioContext missing in Window definition in lib.dom.d.ts #31686

Open
jonsadka opened this issue May 31, 2019 · 0 comments

Comments

Projects
None yet
3 participants
@jonsadka
Copy link

commented May 31, 2019

For most modern browsers, there exists some type of AudioContext on the window, however the current definition for Window has neither of these.

  • In some browsers, the audio context exists at window.AudioContext
  • In some browsers, the audio context exists at window.webkitAudioContext

I would expect the definition of Window in lib.dom.d.ts too look something similar to this:

interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64, GlobalFetch, WindowOrWorkerGlobalScope, WindowEventHandlers {
    AudioContext?: typeof AudioContext;
    webkitAudioContext?: typeof AudioContext;
    ...

Search Terms:
AudioContext, webkitAudioContext , audio context missing in window

Code

window.AudioContext
window.webkitAudioContext

Expected behavior:
AudioContext and webkitAudioContext are defined on the window object

Actual behavior:
AudioContext and webkitAudioContext are not defined on the window object

Playground Link:
https://www.typescriptlang.org/play/#src=window.AudioContext%0Awindow.webkitAudioContext

@jonsadka jonsadka changed the title AudioContext and webkitAudioContext missing in lib.dom.d.ts AudioContext and webkitAudioContext missing in Window definition in lib.dom.d.ts May 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.