What I'm really trying to do is load jquery into an existing page, and
then load my own code, so I can prototype/demo some improvements to a
website I can't otherwise modify.
interactive("jquery-test",
"load and run a jquery file",
function(I) {
subscript_loader.loadSubScript("file://" +
"/usr/share/javascript/jquery/jquery.js", I.buffer.document);
subscript_loader.loadSubScript("file://" + "/tmp/test.js",
I.buffer.document);
});
This definitely loads and runs jquery.js and test.js; if I put alert()
calls in test.js they fire, but $() references in test.js fail with
"ReferenceError: $ is not defined." Actually, now that I look more
closely jquery isn't just logging stylistic warnings, it's also
reporting
Console error: [JavaScript Warning: "reference to undefined property
jQuery.cache[id][name]"
{file: "chrome://conkeror-modules/content/rc.js ->
file:///home/eichin/.emacs.js ->
file:///usr/share/javascript/jquery/jquery.js"
line: 679}]
Category: component javascript
Any suggestions? Is I.buffer.document not the right target object?
--
_Mark_ <[email protected]> <[email protected]>
_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror