We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69866bf commit 5f66408Copy full SHA for 5f66408
lib/internal/url.js
@@ -1104,6 +1104,10 @@ function installObjectURLMethods() {
1104
}
1105
1106
function revokeObjectURL(url) {
1107
+ if (arguments.length === 0) {
1108
+ throw new ERR_MISSING_ARGS('url');
1109
+ }
1110
+
1111
bindingBlob.revokeObjectURL(`${url}`);
1112
1113
test/parallel/test-url-revokeobjecturl.js
@@ -0,0 +1,14 @@
1
+'use strict';
2
3
+require('../common');
4
5
+// Test ensures that the function receives the url argument.
6
7
+const assert = require('node:assert');
8
9
+assert.throws(() => {
10
+ URL.revokeObjectURL();
11
+}, {
12
+ code: 'ERR_MISSING_ARGS',
13
+ name: 'TypeError',
14
+});
0 commit comments