Skip to content

Commit

Permalink
Fix for incorrect implementation of adoptedStylesheets (#527)
Browse files Browse the repository at this point in the history
Fixes #525.

Adds a check intended to ensure that `CSSStyleSheet` is constructable.
  • Loading branch information
Steve Orvell authored and kevinpschaaf committed Feb 4, 2019
1 parent 144872c commit db46ec5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed
* [Breaking] Renamed `unsafeCss` to `unsafeCSS` for consistency with lit-html's `unsafeHTML`

### Fixed
* Adds a check to ensure `CSSStyleSheet` is constructable ([#525](https://github.com/Polymer/lit-element/issues/525)).

## [2.0.0-rc.5] - 2019-01-24
### Fixed
* Fixed a bug causing duplicate styles when an array was returned from `static get styles` ([#480](https://github.com/Polymer/lit-element/issues/480)).
Expand Down
2 changes: 1 addition & 1 deletion src/lib/css-tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ found at http://polymer.github.io/PATENTS.txt
*/

export const supportsAdoptingStyleSheets =
('adoptedStyleSheets' in Document.prototype);
('adoptedStyleSheets' in Document.prototype) && ('replace' in CSSStyleSheet.prototype);

const constructionToken = Symbol();

Expand Down

0 comments on commit db46ec5

Please sign in to comment.