Hi Steve, In most cases it won't make a difference, the JS code will continue to work normally. However, in some extremely rare cases, the rewriter will get confused and the gadget will break horribly. An example is a gadget that emits text that looks like an HTML tag: "Error inserting into the <head> element." When the rewriter passes over this code, it will be confused as to whether this is a legitimate head tag and may insert content around it, breaking the gadget.
Flagging JS blocks with <!-- and // --> will inform the rewriter to ignore these code segments. As to your second question, the sandbox is a good test, but you should require the "opensocial-0.8" feature (even if you don't use it), to guarantee your gadget uses the new renderer. Dan On Feb 4, 1:37 pm, Steven <[email protected]> wrote: > this is in regards to this post on the iGoogle Developer > Blog:http://igoogledeveloper.blogspot.com/2009/01/igoogles-getting-some-ch... > > See the article snippet below for context. > > My question is this - what will happen if your JavaScript doesn't > include the comments > > <!-- > // --> > > and just contains javascript? > > And secondly is there anywhere we can test existing gadgets against > this new rendering method to ensure compatibility ahead of time? > > For instance - if a gadget works well / displays fine in the sandbox - > is this a good test? > > thanks. > Steve > > From the article: > > Second, iGoogle will dynamically rewrite some HTML and JavaScript for > faster loading and rendering times. While this is generally a good > thing, some malformed HTML and JavaScript can cause problems. Make > sure to wrap your JavaScript code as demonstrated by the following > example to avoid many common issues: > > <script type="text/javascript"> > <!-- > // js code goes here... > // --> > </script> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "iGoogle Developer Forum" 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/Google-Gadgets-API?hl=en -~----------~----~----~----~------~----~------~--~---
