Workaround for bug in Safari 16.4 #6

Merged
bramkragten merged 1 commit from patch-1 into master 2023-03-13 10:03:55 +01:00
bramkragten commented 2023-03-13 09:48:14 +01:00 (Migrated from github.com)

In Safari 16.4, [sheet].concat(root.adoptedStyleSheets) returns [CSSStyleSheet, []] instead of [CSSStyleSheet].
This results in a TypeError when trying to assign to root.adoptedStyleSheets.

When using the spread syntax it does give the wanted result.

I will create an issue for this in the webkit bug tracker too.

In Safari 16.4, `[sheet].concat(root.adoptedStyleSheets)` returns `[CSSStyleSheet, []]` instead of `[CSSStyleSheet]`. This results in a `TypeError` when trying to assign to `root.adoptedStyleSheets`. When using the spread syntax it does give the wanted result. I will create an issue for this in the webkit bug tracker too.
marijnh commented 2023-03-13 10:08:15 +01:00 (Migrated from github.com)

Thanks for fixing that. Do I understand correctly that this is an actual regression in Safari, and it used to work in previous versions?

Thanks for fixing that. Do I understand correctly that this is an actual regression in Safari, and it used to work in previous versions?
bramkragten commented 2023-03-13 10:11:13 +01:00 (Migrated from github.com)

Safari 16.4 added support:

  • Added support for constructible and adoptable CSSStyleSheet objects.
Safari 16.4 added support: - Added support for constructible and adoptable CSSStyleSheet objects.
bramkragten commented 2023-03-13 23:43:13 +01:00 (Migrated from github.com)
fyi: https://bugs.webkit.org/show_bug.cgi?id=253814
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
marijn/style-mod!6
No description provided.