[OpenAjaxIDE] <require type="inline">

Jon Ferraiolo jferrai at us.ibm.com
Mon Aug 31 06:36:18 PDT 2009

Hi Kin,
+1. I added a red-colored note in the spec about this in the hope that it
won't fall through the cracks again.


  From:       Kin Blas <jblas at adobe.com>                                                                                                    
  To:         "ide at openajax.org" <ide at openajax.org>                                                                                         
  Date:       08/27/2009 11:04 PM                                                                                                           
  Subject:    [OpenAjaxIDE]  <require type="inline">                                                                                        
  Sent by:    ide-bounces at openajax.org                                                                                                      

During the 03/31/2009 IDE phone call I had mentioned that there was a need
to extend the widget metadata so that singleton content could be added to
the head:

Kin: As a separate issue, we need a way to include singleton content into
the head. Particularly needed in order to insert things for IE5 and IE6.

Jon: I think that's a good feature. A generalization of inline
type=javascript and type=css. But what's the markup? I was thinking REQUIRE

Kin: I like that.

It seems this didn’t make it into the spec. Just to refresh folks memory,
according to the current version of the spec, we can only insert “inline”
JavaScript and CSS <require> content:

<require type=”javascript”><![CDATA[ /* YOUR JS GOES HERE */ ]]></require>
<require type=”css”><![CDATA[ /* YOUR CSS GOES HERE */ ]]></require>

Which results in this being inserted into your document:]>

<script type=”text/javascript”>

<style type=”text/css”>

There is currently no way to insert singleton markup into the document
head. This is what <require type=”inline”> was supposed to allow. So for
example, you could use it to insert IE conditional comments:

<require type=”css” src=”myWidget.css” />
<require type=”javascript” src=”myWidget.js” />
<require type=”inline”>
            <!--[if IE]>
            <script type=”text/javascript”
            <link href="myWidgetIEHacks.css" rel="stylesheet"
            type="text/css" />

Which would result in the inline content being inserted into the document
relative to the other requires:

<script type=”text/javascript” src=”myWidget.js”></script>
<link href="myWidget.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<script type=”text/javascript” src=”myWidgetIEWorkarounds.js”></script>
<link href="myWidgetIEWorkarounds.css" rel="stylesheet" type="text/css" />

We’d like to see this make it into the 1.0 version of the spec as we have
already implemented support for this <require> type and will depend on it
as a mechanism that allows us to add singleton markup to the <head> of the
document for IE workarounds.

--== Kin ==--_______________________________________________
IDE mailing list
IDE at openajax.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openajax.org/pipermail/ide/attachments/20090831/9d3911f6/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://openajax.org/pipermail/ide/attachments/20090831/9d3911f6/attachment.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://openajax.org/pipermail/ide/attachments/20090831/9d3911f6/attachment-0001.gif 

More information about the IDE mailing list