Skip to content

[chore] Add HTMLCanvasElement to global #7769

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

Closed
wants to merge 2 commits into from
Closed

Conversation

elamje
Copy link

@elamje elamje commented Aug 7, 2022

Compiler is not recognizing this name. See #6643 where HTMLElement was added to the globals.

@baseballyama
Copy link
Member

This way will eventually register all of interfaces of lib.dom.d.ts, but should we go this way?

https://github.com/microsoft/TypeScript/blob/main/lib/lib.dom.d.ts

@bluwy
Copy link
Member

bluwy commented Aug 10, 2022

#7768 is a bit similar to this, and could benefit with some script that automates reading lib.dom.d.ts and adding those as known globals 🤔 It won't be futureproof though but might be the easier way to reach correctness.

@jasonlyu123
Copy link
Member

Reading lib.dom.d.ts sounds like a good idea. I tried to write a script from scratch to read the global from the same source as lib.d.ts but turn out to be quite complex and output a lot of globals that are neither in chromium nor firefox.

@baseballyama
Copy link
Member

Close in favor of #7786

Thank you for your contribution @elamje !

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.

4 participants