Prechádzať zdrojové kódy

Array __name__ and __class__

Nicolas Cannasse 19 rokov pred
rodič
commit
99e9422957
2 zmenil súbory, kde vykonal 4 pridanie a 0 odobranie
  1. 2 0
      std/flash/Boot.hx
  2. 2 0
      std/js/Boot.hx

+ 2 - 0
std/flash/Boot.hx

@@ -220,6 +220,8 @@ class Boot {
 					}
 					}
 				}
 				}
 			};
 			};
+			Array.prototype[__unprotect__("__class__")] = Array;
+			Array.__name__ = ["Array"];
 			String.prototype[__unprotect__("__class__")] = String;
 			String.prototype[__unprotect__("__class__")] = String;
 			String.__name__ = ["String"];
 			String.__name__ = ["String"];
 			var cca = String.prototype["charCodeAt"];
 			var cca = String.prototype["charCodeAt"];

+ 2 - 0
std/js/Boot.hx

@@ -213,6 +213,8 @@ class Boot {
 			};
 			};
 			String.prototype.__class__ = String;
 			String.prototype.__class__ = String;
 			String.__name__ = ["String"];
 			String.__name__ = ["String"];
+			Array.prototype.__class__ = Array;
+			Array.__name__ = ["Array"];
 			var cca = String.prototype.charCodeAt;
 			var cca = String.prototype.charCodeAt;
 			String.prototype.charCodeAt = function(i) {
 			String.prototype.charCodeAt = function(i) {
 				var x = cca.call(this,i);
 				var x = cca.call(this,i);