-
Notifications
You must be signed in to change notification settings - Fork 199
Add feature for DOM Geometry #1837
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
Conversation
b150dcb to
7fc086c
Compare
ddbeck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the key question here is: what APIs actually return these types today?
I'm having a hard time reviewing this feature because it reads as extremely generic and I can't find any developers actually talking about "geometry level 1." As written, this feature tells a very unlikely story: that browsers shipped—and developers want—an abstract facility for doing geometry math.
The spec (and searching Stack Overflow) hints that this is not really case:
The SVG interfaces SVGPoint, SVGRect and SVGMatrix are aliasing the here defined interfaces in favor for common interfaces used by SVG, Canvas 2D Context and CSS Transforms. [SVG11] [HTML] [CSS3-TRANSFORMS]
I don't know what the oldest thing is here but due to the limitations that we need to resolve in #971, I suspect these keys should (for now) reside with their oldest companion features, probably something like SVG or Canvas.
see e.g. https://dontcallmedom.github.io/webidlpedia/names/DOMMatrix.html (section "Methods and attributes that return objects implementing DOMMatrix") - works for other names in the list as well.
+1
Among different usages, |
|
I've updated name and description here. I think this is part of the DOM and is an abstract set of interfaces that serve multiple other APIs such as CSS, canvas and SVG. Developers will encounter it in these contexts and if they have worked with it in say CSS, it will be familiar in SVG or canvas. I think it is fine to have such abstract features. Array is also abstract in that sense. I think Python doesn't have builtin matrices either and so numpy is an abstract package ("feature") which will let you work with matrices as a general thing. Does all this move us forward in some direction with this PR? |
|
@ddbeck there are lots of keys here. I think an approach like with sensors (overlapping keys) would be impractical, what do you say? |
|
I discussed this with @ddbeck and we think landing this as "DOM Geometry" is best. |
ddbeck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This PR adds a feature for the Geometry Interfaces Module Level 1.