22 lines
407 B
JavaScript
22 lines
407 B
JavaScript
// ensure that standard js Objects are available on the window and globally
|
|
var tests = [
|
|
'Function',
|
|
'Object',
|
|
'Date',
|
|
'Math',
|
|
'Array',
|
|
'Boolean',
|
|
'Number',
|
|
'String',
|
|
'RegExp',
|
|
'setTimeout',
|
|
'setInterval',
|
|
'clearTimeout',
|
|
'clearInterval'
|
|
];
|
|
|
|
window.hasNativeObjects = true;
|
|
tests.forEach(function(key) {
|
|
window.hasNativeObjects = (window.hasNativeObjects && !!window[key]);
|
|
});
|