Title: HTMLStyleElement.sheet DOM definition · Issue #28098 · microsoft/TypeScript · GitHub
Open Graph Title: HTMLStyleElement.sheet DOM definition · Issue #28098 · microsoft/TypeScript
X Title: HTMLStyleElement.sheet DOM definition · Issue #28098 · microsoft/TypeScript
Description: TypeScript Version: 3.2.0-dev.201xxxxx Search Terms: sheet Code using the DOM API const style = document.querySelector('style'); const sheet = style.sheet; Expected behavior: sheet is returned as a StyleSheet, however ALL browsers do not...
Open Graph Description: TypeScript Version: 3.2.0-dev.201xxxxx Search Terms: sheet Code using the DOM API const style = document.querySelector('style'); const sheet = style.sheet; Expected behavior: sheet is returned as a...
X Description: TypeScript Version: 3.2.0-dev.201xxxxx Search Terms: sheet Code using the DOM API const style = document.querySelector('style'); const sheet = style.sheet; Expected behavior: sheet is retur...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/28098
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"HTMLStyleElement.sheet DOM definition","articleBody":"\u003c!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n-->\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:** 3.2.0-dev.201xxxxx\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** sheet\r\n\r\n**Code**\r\n\r\nusing the DOM API\r\n\r\n```ts\r\nconst style = document.querySelector('style');\r\nconst sheet = style.sheet;\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nsheet is returned as a StyleSheet, however ALL browsers do not return a StyleSheet class, they\r\nreturn a CSSStyleSheet class, so when you do something like sheet.insertRule it\r\ndoesn't exist in the type\r\n\r\n**Actual behavior:**\r\n\r\nstyle.sheet returns a StyleSheet class\r\n\r\n**Playground Link:** https://www.typescriptlang.org/play/index.html#src=const%20style%20%3D%20document.querySelector('style')%3B%0D%0Aconst%20sheet%20%3D%20style.sheet%3B%0D%0A%0D%0Asheet.insertRule('.hello%20%7Bcolor%3A%20%23f00%7D')%3B\r\n\r\n**Related Issues:** \u003c!-- Did you find other bugs that looked similar? -->\r\n","author":{"url":"https://github.com/lifeiscontent","@type":"Person","name":"lifeiscontent"},"datePublished":"2018-10-24T10:21:12Z","url":"https://github.com/microsoft/TypeScript/issues/28098"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ddad6af1-1d13-e6d1-fe63-ffe69f78caae |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8CD6:1F68:5CAFBE:805FA7:6B01C68C |
| html-safe-nonce | 0c1134ff849e1ca1651fda1fd5d89f2e32bb7e6c345385c7feaa5899e9d78390 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0Q2OjFGNjg6NUNBRkJFOjgwNUZBNzo2QjAxQzY4QyIsInZpc2l0b3JfaWQiOiIzNjE0MTU5ODUxMTc5MDY3MDIwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0e986fd6da1124c641539168557ceb6bcc57bda3d2dc70311fa6219dcfad96df |
| hovercard-subject-tag | issue:373410377 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/28098/issue_layout |
| twitter:image | https://opengraph.githubassets.com/06840d1fbe2b61c2de1058565ebf66734ca8c31f996aff5c9effcd917a8440dd/microsoft/TypeScript/issues/28098 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/06840d1fbe2b61c2de1058565ebf66734ca8c31f996aff5c9effcd917a8440dd/microsoft/TypeScript/issues/28098 |
| og:image:alt | TypeScript Version: 3.2.0-dev.201xxxxx Search Terms: sheet Code using the DOM API const style = document.querySelector('style'); const sheet = style.sheet; Expected behavior: sheet is returned as a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lifeiscontent |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width