-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
error: Property 'innnerHTML' does not exist on type 'Element' #5754
Comments
PRs are appreciated. here is how to send lib.d.ts PRs: https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes |
I would like to try to fix this bug, is it possible to assigned it to me ? |
@lgolven feel free to send a PR for it. |
I have added PR here: microsoft/TypeScript-DOM-lib-generator#35 |
@mhegazy Is this a correct way to fix the problem? |
Thanks @MartyIX! This will just need to be synced up with the repo. |
Well, |
@duanyao Be the pull request you want to see in the world 😉 |
Some versions of TypeScript require manual casting of elements to allow innerHTML to be accessed. See: microsoft/TypeScript#5754 microsoft/TypeScript-DOM-lib-generator#35
I am getting this error with
v1.6.3
with the following code:To remedy it, I had to explicitly cast it as
HTMLElement
:However,
innerHTML
is supported byElement
interface:https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML.
The text was updated successfully, but these errors were encountered: