Loading template/app/view/examples/InlinePreview.js +3 −3 Original line number Diff line number Diff line Loading @@ -94,8 +94,8 @@ Ext.define('Docs.view.examples.InlinePreview', { * @param {String} code The code to run inside iframe. */ update: function(code) { var options = this.options, iframeId = this.iframeId, var iframeId = this.iframeId, options = Ext.apply({iframeId: iframeId}, this.options), iframe = document.getElementById(iframeId); if (iframe) { Loading @@ -104,7 +104,7 @@ Ext.define('Docs.view.examples.InlinePreview', { // 1 ms works in Chrome, Firefox wants something bigger. Works in IE too. iframe.onload = function() { Ext.Function.defer(function() { iframe.contentWindow.loadInlineExample(iframeId, code, options); iframe.contentWindow.loadInlineExample(code, options); }, 100); }; iframe.src = "eg-iframe.html"; Loading template/eg-iframe.html +3 −3 Original line number Diff line number Diff line Loading @@ -9,14 +9,14 @@ <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css"> <script type="text/javascript"> function loadInlineExample(exampleId, code, options) { function loadInlineExample(code, options) { try { document.body.innerHTML = ''; eval(code); window.top.Docs.view.examples.InlinePreview.previewSuccess(exampleId); window.top.Docs.view.examples.InlinePreview.previewSuccess(options.iframeId); } catch (e) { document.body.innerHTML = e; window.top.Docs.view.examples.InlinePreview.previewFailure(exampleId, e); window.top.Docs.view.examples.InlinePreview.previewFailure(options.iframeId, e); } } </script> Loading Loading
template/app/view/examples/InlinePreview.js +3 −3 Original line number Diff line number Diff line Loading @@ -94,8 +94,8 @@ Ext.define('Docs.view.examples.InlinePreview', { * @param {String} code The code to run inside iframe. */ update: function(code) { var options = this.options, iframeId = this.iframeId, var iframeId = this.iframeId, options = Ext.apply({iframeId: iframeId}, this.options), iframe = document.getElementById(iframeId); if (iframe) { Loading @@ -104,7 +104,7 @@ Ext.define('Docs.view.examples.InlinePreview', { // 1 ms works in Chrome, Firefox wants something bigger. Works in IE too. iframe.onload = function() { Ext.Function.defer(function() { iframe.contentWindow.loadInlineExample(iframeId, code, options); iframe.contentWindow.loadInlineExample(code, options); }, 100); }; iframe.src = "eg-iframe.html"; Loading
template/eg-iframe.html +3 −3 Original line number Diff line number Diff line Loading @@ -9,14 +9,14 @@ <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css"> <script type="text/javascript"> function loadInlineExample(exampleId, code, options) { function loadInlineExample(code, options) { try { document.body.innerHTML = ''; eval(code); window.top.Docs.view.examples.InlinePreview.previewSuccess(exampleId); window.top.Docs.view.examples.InlinePreview.previewSuccess(options.iframeId); } catch (e) { document.body.innerHTML = e; window.top.Docs.view.examples.InlinePreview.previewFailure(exampleId, e); window.top.Docs.view.examples.InlinePreview.previewFailure(options.iframeId, e); } } </script> Loading