Skip to content

[v13 beta] Consider Safari verison baseline for v13 vs CSS injection change #9876

@microbit-matt-hillsdon

Description

@microbit-matt-hillsdon

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

v13 beta changes the browser baseline in two ways that I can see:

  • :has CSS pulled in from the keyboard navigation plugin, this is expected and was discussed last year (requires Safari 15.4), it's possible there are more involved ways to the same end. No strong view from me but would be good to cover in release notes.
  • Constructable stylesheets + adoptedStylesheets call added on feat!: Allow using Blockly in web components/shadow DOM #9611, this requires Safari 16.4 which is an unexpected baseline raise for us that will affect MakeCode's supported versions and require raising minimum versions for apps. This is also a start-up crash rather than degrade.

Is it viable to fall back to the old approach for #9611 with feature detection / error handling? I can take a look at a PR for this if that's an acceptable path forward.

Reproduction steps

  1. Use Safari 15, e.g. via browserstack
  2. Load v13 branch playground
  3. Note no workspace and logged error.

Priority

I think this is pretty straightforward to address if there's the willingness to maintain a fallback path.

It's possible you could push apps to use a polyfill instead. I haven't tested any with this scenario.

Stack trace

[Error] TypeError: Illegal constructor
	CSSStyleSheet (blockly_compressed.js:134:245)
	register$$module$build$src$core$css (blockly_compressed.js:134:245)
	(anonymous function) (blockly_compressed.js:1422:482)
	(anonymous function) (blockly_compressed.js:10)
	Global Code (blockly_compressed.js:12)

Screenshots

Image

I tested Safari desktop but more worried about edu iPads in practice.

Browsers

Safari desktop

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugDescribes why the code or behaviour is wrongissue: triageIssues awaiting triage by a Blockly team member

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions