| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
( function () { |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
window.VisualEditorSupportCheck = function () { |
| 19 |
return ( |
| 20 |
|
| 21 |
( function () { |
| 22 |
try { |
| 23 |
|
| 24 |
new Function( '(a = 0) => a' ); |
| 25 |
return true; |
| 26 |
} catch ( e ) { |
| 27 |
return false; |
| 28 |
} |
| 29 |
}() ) && |
| 30 |
|
| 31 |
|
| 32 |
/./g.flags === 'g' && |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
!!( 'contentEditable' in document.createElement( 'div' ) ) && |
| 38 |
|
| 39 |
|
| 40 |
!!document.createElementNS && |
| 41 |
|
| 42 |
|
| 43 |
( function () { |
| 44 |
let doc; |
| 45 |
try { |
| 46 |
doc = new DOMParser().parseFromString( '<body></body>', 'text/html' ); |
| 47 |
} catch ( e ) {} |
| 48 |
return doc instanceof HTMLDocument; |
| 49 |
}() ) && |
| 50 |
|
| 51 |
|
| 52 |
!!( |
| 53 |
( 'classList' in document.createElement( '_' ) ) || |
| 54 |
( 'classList' in document.createElementNS( 'http://www.w3.org/2000/svg ', 'g' ) ) |
| 55 |
) && |
| 56 |
|
| 57 |
|
| 58 |
!!( 'createSVGRect' in document.createElementNS( 'http://www.w3.org/2000/svg', 'svg' ) ) |
| 59 |
); |
| 60 |
}; |
| 61 |
}() ); |