brandonaaron / livequery

MIT License
477 stars 195 forks source link

livequery fails to load in embedded Mozilla browser #12

Closed cefn closed 10 years ago

cefn commented 12 years ago

I'm using the JWebBrowser embedded browser component (embedding Xulrunner 1-9.2) from the DJ Project. Somehow livequery is unable to load within this browser and my requests for long-lived selector matches therefore fail, although the same code runs on Chrome and Firefox.

I'm running JQuery, JQuery UI and the JQuery Media plugin all successfully within the XULRunner embedded window, giving me a rich browser experience which seems to be equivalent to a native browser environment, sadly with the exception of livequery.

As far as I know on Linux, this project uses XULRunner (i.e. Mozilla Gecko) for its browser component. For testing against this environment (if you have Java installed) there is a Java Webstart Demo which loads a JWebBrowser component at http://djproject.sourceforge.net/ns/index.html Note that Windows, Mac and Linux all load different web rendering engines, though.

Bizarre. Don't know if there's a workaround you might suggest from knowing how livequery loads. Is there a too-conservative user agent verification of some kind, which is failing to detect Firefox, even though it's basically the same thing? I'd expect the same code to work in XULRunner just the same, although it probably identifies itself differently.

On my machine, the code below differentiates between the runtime environments loading the same page. In XULRunner Livequery is alerted as missing whilst in Firefox it is present despite loading from an identical page.

if (jQuery.livequery){
    alert("Livequery is here");     
} 
else{
    alert("No livequery plugin bound");
}
brandonaaron commented 10 years ago

That is odd. There isn't anything particularly unique about the actual JavaScript code that composes this plugin. I'm not sure why it wouldn't load. I apologize that it is now 2 years later. The plugin is currently undergoing a major rewrite and I'm going to go ahead and close this issue out.