Comments (11)
@rakina - Yea the bug is a simple case, but the workaround would need to be applied to our HTML rendering core for Aurelia 2. I think we will probably be fine waiting as Aurelia 2 won't be RC till after that timeframe. Thank you!
from construct-stylesheets.
Treating template content documents specially seems like a rather inelegant hack from a theoretical purity perspective. But... it looks like it would significantly improve the lives of web developers. So, we should fix it in the way you suggest, theoretical purity be damned.
I agree that this won't have any of the negative consequences that fueled the original decision.
from construct-stylesheets.
Thanks! Yeah it's quite unfortunate.
Also, when trying to update the spec, I found out that the adopting steps passes node
and oldDocument
but not the new document (the document that the node will be adopted into). Is this intentional? If so, I wonder if there's a way for us to check the equality of the new document and the oldDocument
or the constructor document with just these two...
from construct-stylesheets.
This sounds like a reasonable proposal to me! It will definitely fix the potential footgun of moving nodes to a template and back. Does the solution here avoid the multi-document issues discussed on the other threads (e.g. 23, 15, and webcomponents/759-comment)?
from construct-stylesheets.
This sounds like a reasonable proposal to me! It will definitely fix the potential footgun of moving nodes to a template and back. Does the solution here avoid the multi-document issues discussed on the other threads (e.g. 23, 15, and webcomponents/759-comment)?
Yeah, I think unlike the true multi-document case (moving betweeen documents in different frames), the associated-inert-template-document can be treated as the same as its "actual" document (the fetch groups etc is the same).
from construct-stylesheets.
Chromium reporter here. I just wondering what the timeline looks like on this fix? I was going to spend some time putting the workaround in, but it looks like we have some agreements on how to handle which may be introduced fairly soon. LMK TY
from construct-stylesheets.
Chromium reporter here. I just wondering what the timeline looks like on this fix? I was going to spend some time putting the workaround in, but it looks like we have some agreements on how to handle which may be introduced fairly soon. LMK TY
Heya, the spec and impl change is underway, it will be in Chrome M88 release. That won't hit Stable until January, so it's probably good to have the workaround. (from the bug, it seems simple enough?)
from construct-stylesheets.
I don't think this specification should be defining adopting steps for ShadowRoot
. That should be directly done in the DOM Standard. Per class only one specification gets to define those after all. (That might mean HTML still needs to export something, but for a different reason.)
from construct-stylesheets.
I don't think this specification should be defining adopting steps for
ShadowRoot
. That should be directly done in the DOM Standard. Per class only one specification gets to define those after all. (That might mean HTML still needs to export something, but for a different reason.)
Ah I see, didn't know that before, thanks! If we do that, we need the DOM spec to reference adoptedStyleSheets
(because that's cleared on adoption), so I guess updating the spec for this issue is blocked on moving this spec to CSSOM. @mfreed7, do you know what's the latest status on that?
Anyways, I think the impl part in Blink can move forward for now, unless Mozilla folks has other opinions on this. cc @emilio @nordzilla
from construct-stylesheets.
So to be clear the proposal is to only allow adopts from a document's own template-owner document right? Not between arbitrary template/document pairs.
If so I think that should be ok... Otherwise you could use something like this to effectively move stuff across documents.
templateFromDocumentA.content.appendChild(hostFromDocumentA);
documentB.appendChild(hostFromDocumentA);
But yeah it seems ok, I think. A bit of an odd special case to be fair...
from construct-stylesheets.
So to be clear the proposal is to only allow adopts from a document's own template-owner document right? Not between arbitrary template/document pairs.
Yep, exactly! It is quite an odd case, but I think not clearing is less surprising than clearing in this case so hopefully this is a good change.
from construct-stylesheets.
Related Issues (20)
- replace() clears CSS rules before throwing NetworkError HOT 1
- replace() should return promise instead of throwing exception
- Should the origin-clean flag be set or unset? HOT 1
- Invalid constructor syntax HOT 6
- Tracking style sheet order and position in O(1) time. HOT 5
- Spec requires adopted stylesheets to be included in styleSheets property but doesn't require them to be used for styling HOT 9
- Add a note about the reasoning to forbid `insertRule(@import)`, or remove the condition? HOT 16
- Consider disallowing duplicate stylesheets HOT 7
- Sheet's rules after replace() fails to load @import rule HOT 4
- Specification text for replace() does not match Chromium implementation HOT 9
- Observing the changes HOT 9
- Observing the changes HOT 2
- construct stylesheet priority HOT 2
- Spec should define which global object to use for promises HOT 3
- [Question] StyleSheetSets HOT 2
- Composeable Style Sheets
- Regenerate index.html HOT 1
- Drop IDL merged into CSSOM HOT 2
- Explicitly redirect/archive this repo HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from construct-stylesheets.