Search code examples
gwtgwtquery

Is GwtQuery (gQuery)a cross browser library like jQuery?


Does GwtQuery offer the same browser compatibility as jQuery? If not, what browsers has it been tested with?


Solution

    • gQuery(GwtQuery) supports Browser compatibility as jQuery.
    • Each browser gets separately compiled JS

    gQuery is an entire rewrite of GWT in jQuery.

    GQuery and jQuery are built around selectors.

    Both support CSS standard selectors plus extra selectors (:text :password :hidden etc).

    jQuery uses the sizzle engine. A javascript engine which works with any browser and has optimizations per browser.

    GQuery has optimized engines written in java.

    The more appropriate engine is selected in compile time.

    GQuery uses a modified sizzle version for IE6/7

    GQuery adds compile-time optimizations when using compiled selectors.

    Compiled Selectors

    • Use them with immutable selectors and when selector performance is a goal in your application.

    Selectors Performance

    • GQuery in compiled mode produces the faster javascript code to select DOM elements.

    • GQuery dynamic selectors are, in most cases, faster or equal than any other library.

    Events

    • GQuery provides methods for assigning event in a cross-browser way.
    • GQuery event system is compatible with Gwt.
    • issues: – When Gwt detaches a widget, events added via GQuery are lost.

    References:

    https://code.google.com/p/gwtquery/wiki/GettingStarted http://vinaytechs.blogspot.in/2009/09/gwtquery-jquery-in-gwt.html