|
41 | 41 | // assign a false positive if unable to shiv |
42 | 42 | (document.createElement)('a'); |
43 | 43 | var frag = document.createDocumentFragment(); |
44 | | - return ( |
45 | | - frag.cloneNode === void 0 || |
46 | | - frag.createDocumentFragment === void 0 || |
47 | | - frag.createElement === void 0 |
48 | | - ); |
| 44 | + return !(frag.cloneNode && |
| 45 | + frag.createDocumentFragment && |
| 46 | + frag.createElement); |
49 | 47 | }()); |
50 | 48 | } catch(e) { |
51 | 49 | // assign a false positive if detection fails => unable to shiv |
|
331 | 329 | var supportsShivableSheets = !supportsUnknownElements && (function() { |
332 | 330 | // assign a false negative if unable to shiv |
333 | 331 | var docEl = document.documentElement; |
334 | | - return !( |
335 | | - document.namespaces === void 0 || |
336 | | - document.parentWindow === void 0 || |
337 | | - docEl.applyElement === void 0 || |
338 | | - docEl.removeNode === void 0 || |
339 | | - window.attachEvent === void 0 |
340 | | - ); |
| 332 | + return !!(document.namespaces && |
| 333 | + document.parentWindow && |
| 334 | + docEl.applyElement && |
| 335 | + docEl.removeNode && |
| 336 | + window.attachEvent); |
341 | 337 | }()); |
342 | 338 |
|
343 | 339 | /*--------------------------------------------------------------------------*/ |
|
439 | 435 | if (!supportsShivableSheets || ownerDocument.printShived) { |
440 | 436 | return ownerDocument; |
441 | 437 | } |
442 | | - if (namespaces[shivNamespace] === void 0) { |
| 438 | + if (!namespaces[shivNamespace]) { |
443 | 439 | namespaces.add(shivNamespace); |
444 | 440 | } |
445 | 441 |
|
|
521 | 517 | module.exports = html5; |
522 | 518 | } |
523 | 519 |
|
524 | | -}(window === void 0 ? this : window, document)); |
| 520 | +}(window || this, document)); |
0 commit comments