1
0
Fork 0
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:
Gunther Brunner 2014-09-25 18:37:10 +09:00
parent 2f1908b718
commit 329fedbcc6

View file

@ -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')
})
}