We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69866bf commit fe65184Copy full SHA for fe65184
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,13 @@
1
+'use strict';
2
3
+// Test ensures that the function receives the url argument.
4
5
+const assert = require('node:assert');
6
+require('../common');
7
8
+assert.throws(() => {
9
+ URL.revokeObjectURL();
10
+}, {
11
+ code: 'ERR_MISSING_ARGS',
12
+ name: 'TypeError',
13
+});
0 commit comments