- From: Edward O'Connor <eoconnor@apple.com>
- Date: Fri, 20 Jun 2014 11:33:18 -0700
- To: www-style@w3.org
Hi, I wrote: >> What is the coordinate space of the DOMQuads returned from >> getBoxQuads()? Tab replied: > That depends on the options passed in. The function doesn't yet > specify what the default relativeTo argument is, but once it does, > that'll be the default; if you pass in an explicit value, it's > relative to what you passed in. Suppose I call getBoxQuads() like so: var quads = document.querySelector("some element").getBoxQuads({ relativeTo:document }); Given your reply, I would expect each DOMQuad to be in the document's coordinate space. But the MDN post heralding the introduction of this API to Firefox says the following[1]: | For documents, the origin of the document?s viewport is used. This doesn't match what Tab assumed. I prefer Tab's assumed behavior for the relativeTo:document case, that it should be in document coordinates. If we really also want a way to get viewport coordinates, we should have a special relativeTo:"viewport" value or some such. And, of course, we need to decide what the default is if you don't pass in relativeTo. document is probably best there. Ted 1. https://hacks.mozilla.org/2014/03/introducing-the-getboxquads-api/
Received on Friday, 20 June 2014 18:33:48 UTC