Mohit
unread,Aug 1, 2012, 2:19:34 AM8/1/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message as abuse
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
Hey guys,
I am facing a strange problem related to CSS query selector in IE8. I am using standard HTML Doctype.
Sample HTML:
<div id="container">
<input id="field" type="text" />
</div>
The container div is a HTMLPanel.
GWT Native Code:
private static native NodeList<Element> nativeQuery(Element root, String query)/*-{
var root = obj || $doc;
return root.querySelectorAll(query);
}-*/
If I use this code like nativeQuery(getElement(), "#field") where getElement() is the root element of HTMLPanel, it complains in IE8 saying object doesn't support this property.
Plain Javascript Code:
var list = document.getElementById('container').querySelectorAll('#field');
alert(list);
This code runs fine in IE8 and returns me a nodelist containing 1 element.
Can anybody suggest what is the problem with my GWT native method?
Thanks,
Mohit