On Thu, Sep 14, 2017 at 05:37:58PM -0400, Boris Zbarsky wrote:
On 9/14/17 5:33 PM, Ehsan Akhgari wrote:
I think either of these two ideas would be good, but I think
unshipping in 57 is premature without having an understanding of how
much the Web depends on this for UA sniffing.
OK. Do you have any suggestions on how we could gain that understanding?
We could try to detect sniffing like "if (window.content)" by doing
something like this:
1) Make the property non-enumerable.
2) Add a use counter for gets.
That would not detect sniffing like "if ('content' in window)"...
We could also just hide the property on nightly only and see whether
we get bug reports, possibly combined with the non-enumerable and
usecounter bits.
Any other ideas?
Could we make it non-enumerable and add a counter to the window
binding resolve hook? That should catch the `"content" in
window` case (which I'd expect to be the common approach if this
is being used for UA sniffing).
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform