[Developers] acre.markup.define_browser_var

Jason Douglas jason at metaweb.com
Mon Jul 27 19:32:51 UTC 2009


Same goes for <style> tags too, which wasn't supported until recently.

-jason


On Jul 27, 2009, at 12:07 PM, Stefano Mazzocchi wrote:

> Philip Kendall wrote:
>> I note acre.markup.define_browser_var is marked as deprecated. Is  
>> there
>> an alternative way of obtaining this functionality, or is this a Bad
>> Thing to be doing?
>
> It's not a bad thing but it's redundant since Acre now will handle ${}
> expansion even inside <script> tags (because, luckily, ${} is an  
> invalid
> syntax in javascript so we can distinguish it from $() which is valid
> and it's what, say, jQuery does).
>
> So, if you want to pass an acre object over to the client side you can
> simply do
>
> <acre:script>
>  var a = whatever();
> </acre:script>
>
> <script>
>  var a = ${JSON.stringify(a)};
> </script>
>
> -- 
> Stefano Mazzocchi                              Application Catalyst
> Metaweb Technologies, Inc.                      stefano at metaweb.com
> -------------------------------------------------------------------
>
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers



More information about the Developers mailing list