Search in sources :

Example 1 with ViewCSS

use of elemental2.dom.ViewCSS in project gwtproject by treblereel.

the class Element method isRTLSafari.

@JsOverlay
private boolean isRTLSafari() {
    HTMLElement e = Js.uncheckedCast(this);
    // TODO when Document has defaultView, clean this up
    // TODO also see about not referencing a class which doesn't exist in the browser (ViewCSS)
    ViewCSS defaultView = Js.uncheckedCast(Js.<JsPropertyMap<?>>uncheckedCast(e.ownerDocument).get("defaultView"));
    return Objects.equals(defaultView.getComputedStyle(e, "").direction, "rtl");
}
Also used : HTMLElement(elemental2.dom.HTMLElement) ViewCSS(elemental2.dom.ViewCSS) JsPropertyMap(jsinterop.base.JsPropertyMap) JsOverlay(jsinterop.annotations.JsOverlay)

Aggregations

HTMLElement (elemental2.dom.HTMLElement)1 ViewCSS (elemental2.dom.ViewCSS)1 JsOverlay (jsinterop.annotations.JsOverlay)1 JsPropertyMap (jsinterop.base.JsPropertyMap)1