Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The answer right now is "mostly".</p> <p>Basic stuff works, including selecting, deleting and finding. I use 1.5.2 pretty heavily both inside an extension and on content pages from the extension.</p> <p>$.ready() also doesn't work because jQuery assumes and waits for a body. This is the <a href="https://github.com/jquery/jquery/commit/262fcf7b7b919da1564509f621cf7480a5d5572b" rel="nofollow">commit</a> that broke it.</p> <p>Some stuff doesn't work because, as @Daniel describes, jQuery's doesn't properly detect what it can and can't do in XUL (more background below). From stepping through jQuery code I have have found you need at least the following lines in your own code.</p> <pre><code>// Workarounds for jQuery not properly testing support in XUL environment // These are done at jQuery init // This is actually critical, otherwise elements are not properly removed from the cache and you get a cache[id] is undefined crowdmash.$.support.deleteExpando = true; // These are done at ready(), but jQuery never fires ready in XUL // XUL doesn't seem to support offsetWidth and offsetHeight (without this :hidden is broken which breaks fadeIn) crowdmash.$.support.reliableHiddenOffsets = false; crowdmash.$.support.opacity = true; </code></pre> <p>If you want to use jQuery on a content page from an extension, see my <a href="http://forums.mozillazine.org/viewtopic.php?f=19&amp;t=2105087" rel="nofollow">tips</a>.</p> <p><a href="https://github.com/ilyakharlamov/jquery-xul/wiki" rel="nofollow">jquery-xul</a> modifies 1.4.4 to better work with XUL. I have not tried it yet, but from looking at its changes it does look like fixes the ready issue. I don't know if it fixes the support issue .</p> <p>As background on the $.support issue. The problem is that jQuery's feature detection creates a and then populates it using innerHTML. XUL divs do not support innerHTML, so the support code fails marking nothing as supported. There is actually a ticket on this that is open and being discussed for 1.7 - <a href="http://bugs.jquery.com/ticket/5206" rel="nofollow">http://bugs.jquery.com/ticket/5206</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload