Skip to content

Root margin parsing algorithm shouldn't allow non-pixel absolute lengths #308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
alijuma opened this issue Jul 6, 2018 · 2 comments
Open

Comments

@alijuma
Copy link

alijuma commented Jul 6, 2018

The "parse a root margin" algorithm says "If token is an absolute length dimension token, replace it with a an equivalent pixel length". But all implementations (Chrome, Edge, Firefox) throw exceptions on non-pixel absolute lengths (e.g., lengths in cm, mm, in, etc.). So the spec language needs to be updated.

@miketaylr
Copy link
Member

Writing a test here to verify would be good, then we could get the spec text updated.

@miketaylr
Copy link
Member

https://w3c.github.io/IntersectionObserver/#parse-a-root-margin percentage is allowed - but we should write tests to verify throwing for non px or non %.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants