Unfortunately, Quirks mode is required by the spec. See Item 6 under
"Compliance" at http://code.google.com/apis/gadgets/docs/spec.html.

This issue has been brought up numerous times in the past, but there hasn't
been a resolution on it yet. The only reason for this is that many (if not
all) existing gadgets have to be updated to use standards mode since the
original iGoogle site used quirks mode. Many people (myself included) have
attempted to move it towards standards mode, but so far nobody's come up
with a viable solution for backwards compatibility.

~Kevin

On Feb 8, 2008 7:27 PM, Paul Lindner <[EMAIL PROTECTED]> wrote:

> I've started to clean up my crude unit test application into something
> much better.  You can see it here:
>
>  http://www.inuus.com/os/unittest-os.xml
>
> I've settled on the Scriptaculous Unit test framework.  It's pretty
> simple and straightforward.  Here's a test stanza:
>
>        testPrefs: function () { with(this) {
>           var p = new gadgets.Prefs()
>           assertNotNull(p, "cannot get gadgets.Prefs()");
>
>           assertNotNull(p.getCountry());
>           assertNotEqual(p.getCountry(), 'all', 'country cannot be
> "all"');
>           testoutput("Found country: '" + p.getCountry() + "'");
>
>           assertNotNull(p.getLang());
>           assertNotEqual(p.getLang(), 'all', 'lang cannot be "all"');
>           testoutput("Found language: '" + p.getLang() + "'");
>        }}
>
>
> Note that I had patch the gadget server to add a modern doctype (see
> patch below).  I recommend we commit this, since it also gets rid of
> quirks mode in most browsers.  (See
> http://en.wikipedia.org/wiki/Quirks_mode)
>
>
> Index:
> java/gadgets/src/main/java/org/apache/shindig/gadgets/http/GadgetRenderingServlet.java
> ===================================================================
> ---
> java/gadgets/src/main/java/org/apache/shindig/gadgets/http/GadgetRenderingServlet.java
>      (revision 619978)
> +++
> java/gadgets/src/main/java/org/apache/shindig/gadgets/http/GadgetRenderingServlet.java
>      (working copy)
> @@ -158,7 +158,9 @@
>     resp.setContentType("text/html");
>
>     StringBuilder markup = new StringBuilder();
> -    markup.append("<html><head>");
> +    markup.append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 
> 1.0Transitional//EN\"\n")
> +          .append("\"
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%5C>
> ">\n")
> +          .append("<html 
> xmlns=\"http://www.w3.org/1999/xhtml\<http://www.w3.org/1999/xhtml%5C>
> "><head>");
>     // TODO: This is so wrong.
>     markup.append("<style type=\"text/css\">" +
>                   "body,td,div,span,p{font-family:arial,sans-serif;}" +
>
>
>
>
> --
> Paul Lindner
> hi5 Architect
> [EMAIL PROTECTED]
>

Reply via email to