| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 450163c commit 2acbcbd
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1100,6 +1100,10 @@ function installObjectURLMethods() { | |||
| 1100 | 1100 | } | |
| 1101 | 1101 | ||
| 1102 | 1102 | function revokeObjectURL(url) { | |
| 1103 | + if (arguments.length === 0) { | ||
| 1104 | + throw new ERR_MISSING_ARGS('url'); | ||
| 1105 | + } | ||
| 1106 | + | ||
| 1103 | 1107 | bindingBlob.revokeObjectURL(`${url}`); | |
| 1104 | 1108 | } | |
| 1105 | 1109 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -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 | + }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments