Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101371737
_construct.mjs
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Feb 9, 19:10
Size
981 B
Mime Type
text/x-java
Expires
Tue, Feb 11, 19:10 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24146241
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
_construct.mjs
View Options
import _setPrototypeOf from "./_set_prototype_of.mjs";
function isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Date.prototype.toString.call(Reflect.construct(Date, [], function () { }));
return true;
} catch (e) {
return false;
}
}
function construct(Parent, args, Class) {
if (isNativeReflectConstruct()) {
construct = Reflect.construct;
} else {
construct = function construct(Parent, args, Class) {
var a = [null];
a.push.apply(a, args);
var Constructor = Function.bind.apply(Parent, a);
var instance = new Constructor();
if (Class) _setPrototypeOf(instance, Class.prototype);
return instance;
};
}
return construct.apply(null, arguments);
}
export default function _construct(Parent, args, Class) {
return construct.apply(null, arguments);
}
Event Timeline
Log In to Comment