diff --git a/browserDOMOperation.js b/browserDOMOperation.js index 7948add8e5036f1db573216051feeae85b7ccdf3..acee8d82d252d383668533fd3eac7c5ae0abb6e4 100644 --- a/browserDOMOperation.js +++ b/browserDOMOperation.js @@ -1,6 +1,6 @@ /*! browserDOMOperation.js -date 1694313016757 [Sun Sep 10 2023 10:30:16 GMT+0800 (China Standard Time)] +date 1696129594811 [Sun Oct 01 2023 11:06:34 GMT+0800 (China Standard Time)] (c) 2023 Bright_Leader Licensed under the Apache-2.0. */ @@ -396,14 +396,14 @@ const String_constructor=new Object_constructor("")[constructor_key], const String_prototype=String_constructor[prototype_key]; -const Object_toString=Object_prototype.toString; - (function(){ /* module: tests whether the browser is under Content-Security-Policy restrictions */ objectToExport.cspUnsafeEval=function(){ const String_match=String_prototype.match; +const Object_toString=Object_prototype.toString; + return function(){ /* "script-src" CSP directive test */ let tempFunction; try{ @@ -523,7 +523,7 @@ const definePropertyIsFunction=isFunction(defineProperty); const tryES5CreateNullPrototypeObject=function(){ -const create=Object_constructor.create; /* http://262.ecma-international.org/5.1/#sec-15.2.3.5 */ +const create=Object_constructor.create; const createIsFunction=isFunction(create); return function(){ @@ -538,11 +538,62 @@ const createIsFunction=isFunction(create); }; }(); +const createNullPrototypeArrayLikeObject=function(){ + const newObject=tryES5CreateNullPrototypeObject(); + const args=arguments; + const len=args[length_key]; + tryES5DefineProperty( + newObject, + + length_key,len, + + True,False,False + ); + let i_var; + for(i_var=0;i_var