in my implementation (w2tags), I redefine it like this:
!H!script
<script *all*type="javascript">
<</</script>
%script.myjs
$('#content').text('hellow world!');
return false;
Result will be:
<script class="myjs" type="javascript">
$('#content').text('hellow world!');
return false;
</script>
You can try it your self in: http://w2tags.heroku.com/
On Mon, Dec 7, 2009 at 10:28 PM, botanicus <[email protected]> wrote:
> Hey guys,
>
> I created a patch which get me the chance to have default attributes
> for a tag, so if I specify Haml::Engine.new(template,
> default_attributes: {script: {type: "text/javascript"}, form:
> {:method: "POST"}}, then all the script tags will have type="text/
> javascript" and all the forms will have method="POST".
>
> I sent a pull request, however nex3's opinion is that it might lead to
> feature bloat in Haml and he recommend me to ask Haml community. So
> I'd like to know your opinion, if you think it is good idea or now and
> why.
>
> You can find the commit here:
> http://github.com/botanicus/haml/commit/b709ace0c881fa4ed43b9c0c4927939fbef51af6
> It would be probably better not to have any default attributes, I
> know, but I think if I remove them then it might be pretty useful
> thing.
>
> Cheers,
>
> Jakub Stastny aka Botanicus
> http://twitter.com/botanicus
> http://twitter.com/RangoProject
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Haml" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/haml?hl=en.
>
>
>
--
/wh
e=mc2inhologram
--
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=en.