Support opening file: URLs directly
This commit is contained in:
parent
312182e0bd
commit
b74dd43ff5
1 changed files with 1 additions and 1 deletions
|
@ -281,7 +281,7 @@ if (option.file && !option.webdriver) {
|
|||
var file = option.file;
|
||||
var protocol = url.parse(file).protocol;
|
||||
var extension = path.extname(file);
|
||||
if (protocol === 'http:' || protocol === 'https:') {
|
||||
if (protocol === 'http:' || protocol === 'https:' || protocol === 'file:') {
|
||||
loadApplicationByUrl(file);
|
||||
} else if (extension === '.html' || extension === '.htm') {
|
||||
loadApplicationByUrl('file://' + path.resolve(file));
|
||||
|
|
Loading…
Add table
Reference in a new issue