Error when using a target-counter other than "page"
When using a target-counter
with a counter name other than page
, an error is thrown, causing rendering to stop. This is due to the use of an undefined (and, incidentally, misspelt!) variable in the TargetCounter module, on line 120:
this.styleSheet.insertRule(`[data-${target.variable}="${selector}"]${psuedo} { counter-reset: ${target.variable} ${target.variable} ${parseInt(value)}; }`, this.styleSheet.cssRules.length);
The psuedo
variable is not set (it's defined in the other block), causing a ReferenceError.
I appreciate that supporting other counters is still TODO, but it should at least fail elegantly.