Add Symbol to builtins
This commit is contained in:
committed by
Richard van Velzen
parent
0357e5923f
commit
8ad8d7b717
@@ -44,10 +44,16 @@
|
||||
"use strict";
|
||||
|
||||
function find_builtins() {
|
||||
|
||||
// Compatibility fix for es5.1 and earlier where Symbol isn't defined
|
||||
if (!global.Symbol) {
|
||||
global.Symbol = new Function();
|
||||
}
|
||||
|
||||
var a = [];
|
||||
[ Object, Array, Function, Number,
|
||||
String, Boolean, Error, Math,
|
||||
Date, RegExp
|
||||
Date, RegExp, Symbol
|
||||
].forEach(function(ctor){
|
||||
Object.getOwnPropertyNames(ctor).map(add);
|
||||
if (ctor.prototype) {
|
||||
|
||||
Reference in New Issue
Block a user