HiddenBrowser: options is optional, support data: URIs
This commit is contained in:
parent
82107beaa9
commit
e7b792e2d5
1 changed files with 2 additions and 2 deletions
|
@ -121,14 +121,14 @@ class HiddenBrowser {
|
|||
/**
|
||||
*
|
||||
* @param {String} source - HTTP URL, file: URL, or file path
|
||||
* @param {Object} options
|
||||
* @param {Object} [options]
|
||||
* @param {Boolean} [options.requireSuccessfulStatus]
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
async load(source, options) {
|
||||
await this._createdPromise;
|
||||
let url;
|
||||
if (/^(file|https?|chrome|resource|blob):/.test(source)) {
|
||||
if (/^(file|https?|chrome|resource|blob|data):/.test(source)) {
|
||||
url = source;
|
||||
}
|
||||
// Convert string path to file: URL
|
||||
|
|
Loading…
Add table
Reference in a new issue