HTMLScriptElement and HTMLStyleElement type definition does not allow to specify "nonce" attribute #24205
Labels
Bug
A bug in TypeScript
Domain: lib.d.ts
The issue relates to the different libraries shipped with TypeScript
Fixed
A PR has been merged for this issue
Help Wanted
You can do this
Milestone
According to this MDN page,
"nonce"
is a valid attribute for a<script>
element.This page says the same about
<style>
element.TypeScript Version: 2.9.0-dev.20180516
Search Terms:
Code
A fully-functional local example can be created like this (verified on MacOS):
Expected behavior:
the command
should complete without errors
Actual behavior:
There are two errors reported:
Playground Link:
http://www.typescriptlang.org/play/index.html#src=declare%20var%20scriptElement%3A%20HTMLScriptElement%3B%0D%0Adeclare%20var%20styleElement%3A%20HTMLStyleElement%3B%0D%0AscriptElement.nonce%20%3D%20%22someValue%22%3B%0D%0AstyleElement.nonce%20%3D%20%22someValue%22%3B
Related Issues:
Although issue #8955 and pr #8956 are not related to this particular issue, they deal with a very similar problem of having incomplete typings
The text was updated successfully, but these errors were encountered: