Merge pull request #8799 from nitsakh/baseURLForDataURL
Support base URL option to loadURL for data URLs
This commit is contained in:
commit
f549bda9fc
6 changed files with 18 additions and 0 deletions
|
@ -283,6 +283,14 @@ describe('BrowserWindow module', function () {
|
|||
w.loadURL(server.url)
|
||||
})
|
||||
})
|
||||
|
||||
it('should support support base url for data urls', (done) => {
|
||||
ipcMain.once('answer', function (event, test) {
|
||||
assert.equal(test, 'test')
|
||||
done()
|
||||
})
|
||||
w.loadURL('data:text/html,<script src="loaded-from-dataurl.js"></script>', {baseURLForDataURL: `file://${path.join(fixtures, 'api')}${path.sep}`})
|
||||
})
|
||||
})
|
||||
|
||||
describe('will-navigate event', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue