| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8e1a70a commit 6a087ce
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1108,6 +1108,10 @@ function installObjectURLMethods() { | |||
| 1108 | 1108 | } | |
| 1109 | 1109 | ||
| 1110 | 1110 | function revokeObjectURL(url) { | |
| 1111 | + if (arguments.length === 0) { | ||
| 1112 | + throw new ERR_MISSING_ARGS('url'); | ||
| 1113 | + } | ||
| 1114 | + | ||
| 1111 | 1115 | bindingBlob.revokeObjectURL(`${url}`); | |
| 1112 | 1116 | } | |
| 1113 | 1117 | ||
| 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