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:
@@ -11,7 +11,7 @@
|
||||
|
||||
var svgCanvas = null;
|
||||
|
||||
function init_embed() {
|
||||
function initEmbed() {
|
||||
var doc, mainButton,
|
||||
frame = document.getElementById('svgedit');
|
||||
svgCanvas = new EmbeddedSVGEdit(frame);
|
||||
@@ -43,7 +43,7 @@
|
||||
$('#save').click(saveSvg);
|
||||
|
||||
// Export globals
|
||||
window.init_embed = init_embed;
|
||||
window.initEmbed = initEmbed;
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
@@ -51,6 +51,6 @@
|
||||
<button id="load">Load example</button>
|
||||
<button id="save">Save data</button>
|
||||
<br/>
|
||||
<iframe src="svg-editor.html" width="900px" height="600px" id="svgedit" onload="init_embed();"></iframe>
|
||||
<iframe src="svg-editor.html" width="900px" height="600px" id="svgedit" onload="initEmbed();"></iframe>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user