flackr / scroll-timeline

A polyfill of ScrollTimeline.
Apache License 2.0
951 stars 94 forks source link

Fix issue with target.matches in CSS parsing #157

Closed calinoracation closed 1 year ago

calinoracation commented 1 year ago

Fixes https://github.com/flackr/scroll-timeline/issues/156. Adds a try/catch and allows to continue matching if a selector throws.

bramus commented 1 year ago

While this does make the error go away, it does not fix the root cause, which is the CSS parser not being able to parse nested at-rules. Also see #80.

Could be merged for now, but in that case I’d change the // Continue matching comment to // TODO: handle nested at-rules

calinoracation commented 1 year ago

@bramus Ah that makes sense, I updated the TODO.