You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New scoped styles tags added to DOM via html fetch is not triggering on first load/hard refresh. For some reason it works on soft reload. Not helpful when clients will see a broken product on first load.
Seems to be specific to FireFox, although run into similar issue on Chrome ~1/1000 page loads. Not confirmed the error on Chrome is the same cause - hard to debug when it happens so randomly.
Here is an extremely simplified version of my JS:
fetch(url, options)
.then((res) => {
if ( response.ok ) {
return res.text()
}
})
.then((data) => {
// do a bunch of checks to verify the data is ok / manipulate the data to remove harmful scripts
// Then load the fetched HTML into the element
targetElement.innerHTML = data;
})
Get the following error when CSS fails to scope:
Error seems to start by passing in a "null" value for the 'sheet' on line 488. However, when I set a breakpoint there the value is no longer null and the fetched CSS is scoped correctly. Notes in the JS indicate that a Promise could be necessary around here - likely the cause.
The text was updated successfully, but these errors were encountered:
New scoped styles tags added to DOM via html fetch is not triggering on first load/hard refresh. For some reason it works on soft reload. Not helpful when clients will see a broken product on first load.
Seems to be specific to FireFox, although run into similar issue on Chrome ~1/1000 page loads. Not confirmed the error on Chrome is the same cause - hard to debug when it happens so randomly.
Here is an extremely simplified version of my JS:
Get the following error when CSS fails to scope:
Error seems to start by passing in a "null" value for the 'sheet' on line 488. However, when I set a breakpoint there the value is no longer null and the fetched CSS is scoped correctly. Notes in the JS indicate that a Promise could be necessary around here - likely the cause.
The text was updated successfully, but these errors were encountered: