diff --git a/web/democode/demo.html b/web/democode/demo.html index 37e33b4..724210c 100644 --- a/web/democode/demo.html +++ b/web/democode/demo.html @@ -40,6 +40,7 @@ iframe.perleditor { margin: 0.2em 0; } +
@@ -95,7 +96,9 @@ tag, for example using the "Copy Frame URL" link shown in the editor. Note that implementing an automatic resize of the IFrame to fit its contents is nontrivial when sandboxing is enabled, which is why a -fixed height is used below. +fixed height is used below. However, see for example +http://davidjbradshaw.github.io/iframe-resizer/ - examples of how +to use this are included in the source files here. --> @@ -105,6 +108,8 @@ document.getElementById('perl1').src = inputs: [ { fn:"in.txt", text:"Foo\nBar\nQuz" } ], cmdline: "perl -CSD -pe 's/[aeiou]/_/g' in.txt", } )); +// Example of how to use the Optional "IFrame Resizer": +//iFrameResize({checkOrigin:false}, document.getElementById('perl1'));This example includes several files:
diff --git a/web/democode/perleditor.html b/web/democode/perleditor.html index aed7ffa..fe5c246 100644 --- a/web/democode/perleditor.html +++ b/web/democode/perleditor.html @@ -29,6 +29,7 @@ If not, see http://perldoc.perl.org/index-licence.html + @@ -146,6 +147,7 @@ window.addEventListener('message', function (event) { $('#runnererrors').show(); $('#runnererrors>pre').append(data.perlRunnerError+"\n"); } + else if (data.substring(0,13)=="[iFrameSizer]") {} // ignore quietly else console.warn("Perl Editor ignoring unknown message:",data); });