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
It would be nice to be able to optionally have a better rule set name to expose in things like DevTools. Currently Chrome just defaults to the name of the file the rules were found in. Which is less than ideal if adding multiple rules:
And maybe they should be able to be specified per rule group like my-rule-set-2 and my-rule-set-3 below? Though currently DevTools lists them in <script type="speculationrules"> so would be unable to show 2 and 3 on separate lines without changes to that.
Alternatively, we could use the id (or name) attribute from the <script> tag instead and just make this a Chrome DevTools implementation change instead of a spec change. But that would definitely only allow one per script tag - which is probably fine.
The text was updated successfully, but these errors were encountered:
I think we should start with the id on the script tag as a Chrome DevTools implementation change. (Someone should do a quick mockup of how best to signal that---do we include the URL too? What typography do we use? Etc.)
But there is precedent for this kind of debugging-only property with worker names. So if we, or any other browser, ever has a UI which displays each rule set separately, we could easily add this. Similarly, if we add more introspection APIs in the future which would benefit from identifying the triggering rule set, we could add this.
It would be nice to be able to optionally have a better rule set name to expose in things like DevTools. Currently Chrome just defaults to the name of the file the rules were found in. Which is less than ideal if adding multiple rules:
And maybe they should be able to be specified per rule group like
my-rule-set-2
andmy-rule-set-3
below? Though currently DevTools lists them in<script type="speculationrules">
so would be unable to show 2 and 3 on separate lines without changes to that.Alternatively, we could use the
id
(orname
) attribute from the<script>
tag instead and just make this a Chrome DevTools implementation change instead of a spec change. But that would definitely only allow one per script tag - which is probably fine.The text was updated successfully, but these errors were encountered: