DescriptionReworked html-emitter.
The open tag compiles to a b() call which gets the tagname followed by
any number of a() and h() calls to specify attributes and handlers,
followed by a f() call to finish the attribute list.
Previously, the b() call made the element, and a() and h() called set
attribute, and the f() call only managed the stack of open elements.
Now, the b(), a(), and h() calls store information.
The f() call does all the work, which allows it to create the
alternate IE input form to document.createElement, but only on IE.
This also modifies bridal to export an isIE flag. I need to merge
this with the bug-987 fixes which define isIE properly:
http://codereview.appspot.com/17062/diff/1/5
From http://code.google.com/p/google-caja/issues/detail?id=865
in the testbed, cajole this in ie7:
<form>
<input type=radio name=a id=a1 value=1>1<br>
<input type=radio name=a id=a2 value=2>2<br>
</form>
the radio buttons are not selectable.
the problem is, for input elements to work properly in ie7,
the name= attribute has to be specified in the createElement call:
document.createElement('input name=a');
some of the earlier examples in this bug succeed because
caja uses innerHTML optimization to emit the html,
which avoids the createElement call.
my example includes id= attributes to defeat the innerHTML optimization.
I don't know of any other way of creating usable form elements in ie7.
I think this means HtmlCompiler and html-emitter need to have
special-case handling of input elements.
@3266
Patch Set 1 #
MessagesTotal messages: 2
|
|||||||||||||||||||||||||||||||||||||