From: Jason Woofenden Date: Thu, 18 May 2017 16:10:26 +0000 (-0400) Subject: whitespace cleanup X-Git-Url: https://jasonwoof.com/gitweb/?p=peach-html5-editor.git;a=commitdiff_plain;h=c753e098069685cae49988ba752a47b2818b1c5b whitespace cleanup --- diff --git a/editor.js b/editor.js index 85c8f10..104bbae 100644 --- a/editor.js +++ b/editor.js @@ -825,39 +825,37 @@ function PeachHTML5Editor (in_el, options) { if (this.options.editor_id != null) { this.outer_iframe.setAttribute('id', this.options.editor_id) } - this.outer_iframe.onload = (function(_this) { - return function() { - var icss - _this.outer_idoc = _this.outer_iframe.contentDocument - icss = domify(_this.outer_idoc, { style: { children: [ - domify(_this.outer_idoc, {text: css}) - ]}}) - _this.outer_idoc.head.appendChild(icss) - _this.iframe = domify(_this.outer_idoc, {iframe: {sandbox: 'allow-same-origin allow-scripts'}}) - _this.iframe.onload = function() { + this.outer_iframe.onload = (function(_this) { return function() { + var icss + _this.outer_idoc = _this.outer_iframe.contentDocument + icss = domify(_this.outer_idoc, { style: { children: [ + domify(_this.outer_idoc, {text: css}) + ]}}) + _this.outer_idoc.head.appendChild(icss) + _this.iframe = domify(_this.outer_idoc, {iframe: {sandbox: 'allow-same-origin allow-scripts'}}) + _this.iframe.onload = function() { + return _this.init_1() + } + timeout(200, function() { // firefox never fires this onload + if (!_this.init_1_called) { return _this.init_1() } - timeout(200, function() { // firefox never fires this onload - if (!_this.init_1_called) { - return _this.init_1() - } - }) - _this.outer_idoc.body.appendChild( - domify(_this.outer_idoc, {div: {id: 'wrap1', children: [ - domify(_this.outer_idoc, {div: { - style: "position: absolute; top: 0; left: 1px; font-size: 10px", - children: [domify(_this.outer_idoc, {text: "Peach HTML5 Editor"})] - }}), - _this.wrap2 = domify(_this.outer_idoc, {div: {id: 'wrap2', children: [ - domify(_this.outer_idoc, {div: {id: 'wrap3', children: [ - _this.iframe, - _this.overlay = domify(_this.outer_idoc, { div: { id: 'overlay' }}) - ]}}) + }) + _this.outer_idoc.body.appendChild( + domify(_this.outer_idoc, {div: {id: 'wrap1', children: [ + domify(_this.outer_idoc, {div: { + style: "position: absolute; top: 0; left: 1px; font-size: 10px", + children: [domify(_this.outer_idoc, {text: "Peach HTML5 Editor"})] + }}), + _this.wrap2 = domify(_this.outer_idoc, {div: {id: 'wrap2', children: [ + domify(_this.outer_idoc, {div: {id: 'wrap3', children: [ + _this.iframe, + _this.overlay = domify(_this.outer_idoc, { div: { id: 'overlay' }}) ]}}) ]}}) - ) - } - })(this) + ]}}) + ) + }})(this) outer_wrap = domify(document, {div: {"class": 'peach_html5_editor' }}) this.in_el.parentNode.appendChild(outer_wrap) outer_bounds = get_el_bounds(outer_wrap)