2012/2/27 lkcl luke <[email protected]>:
> On Mon, Feb 27, 2012 at 12:18 AM, Peter Bittner <[email protected]> wrote:
>
>> We must make it easy for the "end user" (developers using Pyjamas for
>> their projects) to
>>  1.) add code that needs to execute "early" (provide a generic facility)
>
>  all that's needed to achieve that is to simply insert <script xyz>
> into the loader file.

No. You also have to write the damn javascript code. Or at least pass
a --bootstrap-file parameter to pyjsbuild. Why not have a
configuration setting only to free developers from thinking too much,
unnecessarily?

>  this has the benefit of working with pyjd as well (because the pyjd
> engines are, after all, still web browser engines).
>
>  you *have* to think simultaneously about pyjd, peter, not just
> javascript, javascript, javascript.
>
>  whenever you propose these kinds of things, it's really really
> important to think, "how am i going to make the *exact* same
> functionality work in pyjd, python-only?"

I do. And bootstrap.js is javascript only and should stay there. As
mentioned in the other thread: The script tag for including
bootstrap.js has to go away from the html template; it should be
inserted into the template by pyjs at build time. Let the html
(container file, that is) in <app_name/public/ be clean from
javascript.

>  in other words, how do people execute "early" code (provide a generic
> facility) under the pyjd environment?  bearing in mind that
> bootstrap{_xxsdadadhsak}.js doesn't even *exist* in the pyjd
> environment.

They don't with pyjd. That's why it should be in javascript Pyjamas
(pyjsbuild), i.e. <app_name>/output/, only. And that doesn't stop us
from adding some convenience functionality to the pyjs build process.

Peter

P.S.: Thanks for starting the upload. Currently, it displays in a
weired fashion (with Chrome) because header.html (and others) are
still in the brwoser cache. It's a pain with the browser world and
updates to Pyjamas applications... :-)

Reply via email to