thank you to rasiel for this one.

http://code.google.com/p/pyjamas/issues/detail?id=661

ugh!  new platform needed, at some point (IE8/9).  this will do for now.

could someone verify that this is also borked for pyjd (MSHTML) engine
when IE9 is installed?  it should be (borked, that is) because the
equivalent code (pure python) in DOM.mshtml.py is this:

def createInputRadio(group):
    return doc().createElement("<INPUT type='RADIO' name='" + group + "'>")

which of course doesn't take into account the exact same problem (but
just in python) - see below.  problem is i don't know where to get
userAgent from in MSHTML!  probably best to do it as a try/except
block or something.

l.

bugfixed code:

 48 def createInputRadio(group):
 49     JS("""
 50     ua = navigator.userAgent.toLowerCase();
 51     if (ua.indexOf('msie 9.0') != -1) {
 52         var elem = $doc.createElement("INPUT");
 53         elem.type = 'radio';
 54         elem.name = @{{group}};
 55         return elem
 56     }
 57
 58     return $doc.createElement("<INPUT type='RADIO' name='" +
@{{group}} + "'>");
 59     """)

Reply via email to