[Seaside] HTML5 and RenderLoopContinuation

Paul DeBruicker pdebruic at gmail.com
Thu Nov 22 21:08:03 UTC 2012


Is there any reason to not make the #beHtml5 method do all the things in 
your configuration?




On 11/22/2012 05:18 AM, Boris Popov, DeepCove Labs wrote:
> Tobias,
>
> This is what we do in our shared library class to configure all roots for HTML5,
>
> aHtmlRoot beHtml5.
> aHtmlRoot headElements copy do: [:ea | (ea isKindOf: WAMetaElement) ifTrue: [aHtmlRoot headElements remove: ea]].
> (aHtmlRoot htmlAttributes)
>      addClass: 'no-js';
>      removeKey: 'xmlns';
>      removeKey: 'xml:lang';
>      removeKey: 'lang'.
> aHtmlRoot headElements addFirst: ((WAMetaElement root: aHtmlRoot)
>              attributeAt: 'charset' put: 'utf-8';
>              yourself).
> (aHtmlRoot meta)
>      responseHeaderName: 'X-UA-Compatible';
>      content: 'IE=edge,chrome=1'.
>
> -Boris
>
>
> -----Original Message-----
> From: seaside-bounces at lists.squeakfoundation.org [mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Tobias Pape
> Sent: Thursday, November 22, 2012 5:08 AM
> To: Seaside - general discussion
> Subject: [Seaside] HTML5 and RenderLoopContinuation
>
> Hi
>
> I just played with Seaside and HTML5,
> however, the resulting html is not HTML5 compatible.
> The validator says	
> 	Line 2, Column 249: Bad value Content-Script-Type for attribute http-equiv on element meta.
>
> which is the result of
>
> WARenderLoopContinuation>>updateRoot:
> 	"..."
> 	anHtmlRoot meta contentScriptType: WAMimeType textJavascript.
> 	anHtmlRoot htmlAttributes
> 		at: 'xmlns' put: 'http://www.w3.org/1999/xhtml';
> 		at: 'xml:lang' put: 'en';
> 		at: 'lang' put: 'en'.
> 	"..."
>
> The content script type is incorrect as of HTML5.
> (see answer here:
> 	http://stackoverflow.com/questions/6320084/why-is-meta-http-equiv-content-script-type-mostly-unused#8864160
> ).
> Also, 'xml:lang' is accepted for compatibility only, and 'xmlns' is incorrect for
> HTML5 too (while silently ignored).
>
> Long story short, can we optionalize this part?
> I can work around the xml:lang and xmlns-attributes in a subsequent #updateRoot: but I cannot undo the content script type without editing WARenderLoopContinuation>>updateRoot:
>
> If you want to, I can try to come up with something.
>
> Best
> 	-tobias
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



More information about the seaside mailing list