Loading template/app/view/examples/InlinePreview.js +2 −2 Original line number Diff line number Diff line Loading @@ -43,14 +43,14 @@ Ext.define('Docs.view.examples.InlinePreview', { * @param {String} code The code to run inside iframe. */ update: function(code) { var options = this.options.raw; var options = this.options; var iframe = document.getElementById(this.getIframeId()); // Something is not quite ready when onload fires. // I'm unsure what I should wait for. So I'm currently adding just this nasty delay. // 1 ms works in Chrome, Firefox wants something bigger. Works in IE too. iframe.onload = function() { Ext.Function.defer(function() { iframe.contentWindow.refreshPage(code, options.raw); iframe.contentWindow.refreshPage(code, options); }, 100); }; iframe.src = Docs.touchExamplesUi ? "touchIframe.html" : "extIframe.html"; Loading template/touchIframe.html +2 −2 Original line number Diff line number Diff line Loading @@ -8,10 +8,10 @@ <link rel="stylesheet" type="text/css" href="touch/resources/css/sencha-touch.css"> <script type="text/javascript"> var refreshPage = function(code, raw) { var refreshPage = function(code, options) { try { document.body.innerHTML = ''; if (!raw) { if (!options.raw) { code = "Ext.setup({onReady: function(){" + code + "}});"; } eval(code); Loading Loading
template/app/view/examples/InlinePreview.js +2 −2 Original line number Diff line number Diff line Loading @@ -43,14 +43,14 @@ Ext.define('Docs.view.examples.InlinePreview', { * @param {String} code The code to run inside iframe. */ update: function(code) { var options = this.options.raw; var options = this.options; var iframe = document.getElementById(this.getIframeId()); // Something is not quite ready when onload fires. // I'm unsure what I should wait for. So I'm currently adding just this nasty delay. // 1 ms works in Chrome, Firefox wants something bigger. Works in IE too. iframe.onload = function() { Ext.Function.defer(function() { iframe.contentWindow.refreshPage(code, options.raw); iframe.contentWindow.refreshPage(code, options); }, 100); }; iframe.src = Docs.touchExamplesUi ? "touchIframe.html" : "extIframe.html"; Loading
template/touchIframe.html +2 −2 Original line number Diff line number Diff line Loading @@ -8,10 +8,10 @@ <link rel="stylesheet" type="text/css" href="touch/resources/css/sencha-touch.css"> <script type="text/javascript"> var refreshPage = function(code, raw) { var refreshPage = function(code, options) { try { document.body.innerHTML = ''; if (!raw) { if (!options.raw) { code = "Ext.setup({onReady: function(){" + code + "}});"; } eval(code); Loading