jashkenas / underscore

JavaScript's utility _ belt
https://underscorejs.org
MIT License
27.29k stars 5.53k forks source link

"supportsDataView" checks DataView is defined but not if it has a constructor #2985

Closed colingm closed 11 months ago

colingm commented 1 year ago

We have noticed a few cases where a site has DataView still defined on the page but for some reason they have decided to modify it such that it is no longer a constructor (maybe by doing something that assigns to window.DataView). It would be nice if we could make the supportsDataView check more than just whether or not DataView is defined.

image