Re: [fxtf-drafts] [geometry] DOMRect: use of unrestricted doubles - min(x, NaN)

So I think the relevant testcase here is sort of like this:

    <script>
      var r = new DOMRect();
      r.x = 5;
      r.width = NaN;
      alert(r.left);
    </script> 

here Firefox nightly and Chrome dev alert `5`, while Safari Tech Preview alerts `NaN`.

It does seem to me that reliably returning `NaN` here would be somewhat better, but I'm not an expert on this code or how people use these APIs.  If they use them.


-- 
GitHub Notification of comment by bzbarsky
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/222#issuecomment-382143487 using your GitHub account

Received on Tuesday, 17 April 2018 20:58:12 UTC