[Laszlo-dev] DHTML support for native browser <script> tag ?
P T Withington
ptw at openlaszlo.org
Thu Jun 28 09:05:56 PDT 2007
I know certain people will not like this idea, but I would favor
dispatching on the script tag language attribute:
<script type="text/javascript" language="javascript">
means pass this straight through
<script type="text/javascript" language="laszloscript">
means process with our script compiler
By default, the language is "laszloscript", so you can leave that out.
On 2007-06-28, at 11:25 EDT, Henry Minsky wrote:
> OK I think someone asked a similar question recently, regarding
> inclusion of
> native browser javascript
> into DHTML apps.
>
> I am trying out a 3rd party library, and want to put include code
> into my
> app using
> a <script> tag like this
>
> <script type='text/javascript'
> src='/legals4/dwr/interface/JDate.js'></script>
> <script type='text/javascript' src='/legals4/dwr/engine.js'></script>
>
> First question is do I want these to be included at runtime or
> compile time?
> In this case,
> I would like them to be included at runtime, using the browser's
> <script>
> loading mechanism.
>
> We recently added a script loaded for supporting <import> libraries in
> DHTML. I can call
> out to Lz.__dhtmlLoadLibrary from my own script block,
>
> <script>
> Lz.__dhtmlLoadLibrary('/legals4/dwr/interface/JDate.js');
> Lz.__dhtmlLoadLibrary('/legals4/dwr/engine.js');
> </script>
>
> which isn't a bad solution, though I don't know if we're
> advertising this as
> a public API
>
> But I'm wondering if we want to put some sort of LZX
> language support for this kind of thing to make it easier for DHTML
> developers to integrate their
> 3rd party libraries into LZX apps?
>
> What I'm proposing might be something which modifies the <script>
> tag, or
> maybe the <import> tag perhaps.
>
>
> <script browsernative="true"type='text/javascript'
> src='/legals4/dwr/interface/JDate.js'></script>
>
> Or
>
> <import stage="immediate" href="/legals4/dwr/interface/JDate.js"
> browsernative="true"/>
>
> I don't really have a good proposal here, anyone have any thoughts?
>
>
>
>
> --
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com
More information about the Laszlo-dev
mailing list