mirror of
https://github.com/openstf/stf
synced 2025-10-05 10:39:25 +02:00
Fix semicolon-caused bug.
This commit is contained in:
parent
2f1908b718
commit
329fedbcc6
1 changed files with 6 additions and 2 deletions
|
@ -26,7 +26,11 @@ module.exports = function deviceContextMenuDirective($window) {
|
|||
var event = document.createEvent('Event')
|
||||
event.initEvent('click', true, true)
|
||||
save.dispatchEvent(event)
|
||||
(window.URL || window.webkitURL).revokeObjectURL(save.href)
|
||||
if (window.URL) {
|
||||
window.URL.revokeObjectURL(save.href)
|
||||
} else if (window.webkitURL) {
|
||||
window.webkitURL.revokeObjectURL(save.href)
|
||||
}
|
||||
}
|
||||
|
||||
// for IE
|
||||
|
@ -40,7 +44,7 @@ module.exports = function deviceContextMenuDirective($window) {
|
|||
|
||||
scope.saveScreenShot = function () {
|
||||
scope.control.screenshot().then(function (result) {
|
||||
saveToDisk(result.body.href, result.body.name)
|
||||
saveToDisk(result.body.href, result.body.date + '.jpg')
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue