Bug 255640 - Declarative shadow DOM does not block rendering on <link> (browser inconsistency)
Summary: Declarative shadow DOM does not block rendering on <link> (browser inconsiste...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks: 148695
  Show dependency treegraph
 
Reported: 2023-04-18 21:06 PDT by mic.gallego
Modified: 2023-05-01 18:37 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mic.gallego 2023-04-18 21:06:18 PDT
Hi,

While trying the declarative shadow DOM, I found that Safari does not block rendering if it encounters a <link> external stylesheet, causing FOUC. Chrome, on the other hand, seems to block the rendering until the stylesheet is loaded.

I could not find on the spec which behavior is expected, but having inconsistent behavior makes it hard to properly implement a workaround. From a developer point of view, blocking is more desirable (the only way to avoid blocking is to load the stylesheet in the head in the global scope, which leak all the styles).

I've raised this concern as well in the W3C repo: https://github.com/whatwg/dom/issues/1187

Thanks.
Comment 1 Radar WebKit Bug Importer 2023-04-25 21:07:20 PDT
<rdar://problem/108539923>
Comment 2 Karl Dubost 2023-05-01 18:36:51 PDT
Discussion is started on https://github.com/whatwg/dom/issues/1187

Anne mentioned 
> Looking at https://html.spec.whatwg.org/#contributes-a-script-blocking-style-sheet and #5465 this would constitute a bug in Chromium, though it does seem somewhat logical to update the