HTML file should be clean (for Pyjamas Desktop) => inject Pyjamas "magic" at compile time #25

pyjsorg opened this Issue Apr 27, 2012 · 2 comments


None yet

1 participant

pyjsorg commented Apr 27, 2012

The HTML file for a pyjs application contains several tags that are only necessary for the pure Javascript version of the resulting application.

We should keep the HTML file clean from things that are not needed by Pyjamas Desktop (bootstrap Javascript file, history iframe, module meta tag). These tags should be injected into the HTML file by pyjsbuild at compile time.

This topic has been discussed in:

Original issue: (March 07, 2012 02:40:08)

pyjsorg commented Apr 27, 2012

From on March 07, 2012 02:41:19:
I've adapted the HTML file generation in in order to make
the tag obsolete and allow for leaving out everything
unneeded for pyjd: This is achieved through pyjsbuild injecting

1.) the bootstrap script tag + the history iframe right before the
closing tag
2.) (or replacing) the pygwt:module meta tag right before the
closing tag

It is now possible to (let the developer) provide a handmade plain
HTML file with no Pyjamas magic in it at all. Pyjamas Desktop doesn't
need "magic", so the HTML file can be clean, small, simple. All the
magic (meta tag, bootstrap script, history iframe) is injected by
Pyjamas (pyjsbuild) at compile time.

I've also adapted the 'helloworld' and 'helloworldsplash' examples to
reflect (show off, if s/o notices) the new feature.

NOTE: the changes may affect existing projects as (at least) a second
bootstrap script tag + history iframe will be added to the existing
HTML file in <my_app>/public. This is easily fixed by removing the -
now unnecessary - lines from the HTML.

pyjsorg commented Apr 27, 2012

From on March 10, 2012 20:40:59:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment