aboutsummaryrefslogtreecommitdiffstats
path: root/vanilla/node_modules/jsdom/lib/jsdom/living/generated/BlobCallback.js
diff options
context:
space:
mode:
Diffstat (limited to 'vanilla/node_modules/jsdom/lib/jsdom/living/generated/BlobCallback.js')
-rw-r--r--vanilla/node_modules/jsdom/lib/jsdom/living/generated/BlobCallback.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/vanilla/node_modules/jsdom/lib/jsdom/living/generated/BlobCallback.js b/vanilla/node_modules/jsdom/lib/jsdom/living/generated/BlobCallback.js
new file mode 100644
index 0000000..a302a40
--- /dev/null
+++ b/vanilla/node_modules/jsdom/lib/jsdom/living/generated/BlobCallback.js
@@ -0,0 +1,30 @@
+"use strict";
+
+const conversions = require("webidl-conversions");
+const utils = require("./utils.js");
+
+exports.convert = (globalObject, value, { context = "The provided value" } = {}) => {
+ if (typeof value !== "function") {
+ throw new globalObject.TypeError(context + " is not a function");
+ }
+
+ function invokeTheCallbackFunction(blob) {
+ const thisArg = utils.tryWrapperForImpl(this);
+ let callResult;
+
+ blob = utils.tryWrapperForImpl(blob);
+
+ callResult = Reflect.apply(value, thisArg, [blob]);
+ }
+
+ invokeTheCallbackFunction.construct = blob => {
+ blob = utils.tryWrapperForImpl(blob);
+
+ let callResult = Reflect.construct(value, [blob]);
+ };
+
+ invokeTheCallbackFunction[utils.wrapperSymbol] = value;
+ invokeTheCallbackFunction.objectReference = value;
+
+ return invokeTheCallbackFunction;
+};