public NodeList<Element> select(String selector, Node ctx) { try { return SelectorEngine.querySelectorAllImpl(selector, ctx); } catch (Exception e) { console.error("GwtQuery: Selector '" + selector + "' is unsupported in this SelectorEngineNativeMin engine." + " Do not use this syntax or configure your module to use a JS fallback. " + e.getMessage()); return null; } } }
.log("Error: GQuery.$(Object o) could not wrap the type : ", o.getClass().getName(), o);
return SelectorEngine.querySelectorAllImpl(selector, ctx); } catch (Exception e) { console.info("ERROR SelectorEngineNative " + e.getMessage() + " " + selector + ", falling back to " + impl.getClass().getName().replaceAll(".*\\.", ""));
public void onBrowserEvent(Event event) { // console.log("onBrowser", event.getType(), event, element); if (JsUtils.isDefaultPrevented(event)) { console.log("RETTT"); return; } double now = Duration.currentTimeMillis(); // Workaround for Issue_20 if (lastType.equals(event.getType()) && now - lastEvnt < 10 && "body".equalsIgnoreCase(element.getTagName())) { return; } lastEvnt = now; lastType = event.getType(); // Execute the original Gwt listener if (getOriginalEventListener() != null && getOriginalEventListener() != this) { getOriginalEventListener().onBrowserEvent(event); } dispatchEvent(event); }
public NodeList<Element> select(String selector, Node ctx) { try { return SelectorEngine.querySelectorAllImpl(selector, ctx); } catch (Exception e) { console.error("GwtQuery: Selector '" + selector + "' is unsupported in this SelectorEngineNativeMinIE8 engine," + " check that you are in 'standards mode' or configure your module to use JS fallback. " + e.getMessage()); return null; } } }
public NodeList<Element> select(String sel, Node ctx) { if (cache == null) { cache = JsNamedArray.create(); } String xsel = cache.get(sel); if (xsel == null) { xsel = sel.startsWith("./") || sel.startsWith("/") ? sel : css2Xpath(sel); cache.put(sel, xsel); } JsNodeArray elm = JsNodeArray.create(); try { SelectorEngine.xpathEvaluate(xsel, ctx, elm); return JsUtils.unique(elm.<JsArray<Element>> cast()).cast(); } catch (Exception e) { if (!GWT.isScript()) { if (!SelectorEngine.hasXpathEvaluate()) { throw new RuntimeException("This Browser does not support Xpath selectors.", e); } console.error("ERROR: xpathEvaluate invalid xpath expression: " + xsel + " css-selector: " + sel + " " + e.getMessage() + "\n"); } return elm; } } }