-
Notifications
You must be signed in to change notification settings - Fork 58
Use absolute URL in XHR feature tests #320
Comments
The add('blob', function () {
if (!has('xhr2')) {
return false;
}
const request = new global.XMLHttpRequest();
request.open('GET', 'http://google.com', true);
request.responseType = 'blob';
request.abort();
return request.responseType === 'blob';
}); |
We should also consider the ordering/impact/effect of Currently But the dojo/shim#80 proposes to change the order, so that So even using |
@kitsonk That's a fair point but would mean changing more than the currently broken sniff (means we'd need to change more than Do you think that warrants its own issue? |
Well, for this sniff, the safest thing would still be As far as larger impacts on ordering and generally properly sniffing window features. Yes, that should be a separate issue. |
dojo/has#48 covers the proper use of |
The fix has gone in but this still needs to have tests added. |
Bug / Enhancement
Any
dojo/has
test operating on anXMLHttpRequest
instance that might be run from within a Web Worker generated from a blob should use an absolute URL (see https://bugs.dojotoolkit.org/ticket/18998).This is most likely relevant in
has('blob')
:core/src/has.ts
Line 20 in 8baeca2
A unit test similar to the one in Dojo 1 PR 260 should be included.
The text was updated successfully, but these errors were encountered: