change beforeunload to use addEventListener (only supporting IE9 now and better to allow multiple if user wishes); also CamelCase internal variable for consistency; add brackets

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2639 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Brett Zamir
2014-01-31 00:06:50 +00:00
parent 7a4d8949c7
commit 6b5a4e645e
4 changed files with 17 additions and 9 deletions

View File

@@ -220,7 +220,9 @@ svgedit.history.RemoveElementCommand.prototype.unapply = function(handler) {
svgedit.transformlist.removeElementFromListMap(this.elem);
if (this.nextSibling == null) {
if (window.console) console.log('Error: reference element was lost');
if (window.console) {
console.log('Error: reference element was lost');
}
}
this.parent.insertBefore(this.elem, this.nextSibling);