context.createElement is not a function

26 views
Skip to first unread message

Matthew

unread,
Nov 16, 2009, 9:26:38 PM11/16/09
to mozilla-labs-jetpack
I'm trying to write a jetpack that grabs a page, scrapes some data out
of it, and puts a message in the status bar. I'm just not seeing
something because I keep getting the error mentioned in this message's
subject.

I've tried both writing from scratch and starting with a working
example (e.g. Bandit's Gmail Checker) and paring it down and either
way I still get the same problem.

Here's a minimal example of what I'm screwing up....

jetpack.statusBar.append({ onReady: function(doc) {
$.get("http://www.galaxyzoo.org/
zoonometer",
function (data) {
var elem = $(data).find
("#counter");
});
} });

Any suggestions are appreciated!

Matt

Thomas Bassetto

unread,
Nov 17, 2009, 1:10:51 AM11/17/09
to mozilla-la...@googlegroups.com
Hi Matthew,

You need to precise the "context" line 3 :
jetpack.statusBar.append({ onReady: function(doc) {
$.get("http://www.galaxyzoo.org/zoonometer", function (data) {
var elem = $(data, doc).find("#counter");
console.log(elem);
});
}});

Does it work better?

Thomas

2009/11/17 Matthew <matthew....@gmail.com>:
> --
>
> You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
> To post to this group, send email to mozilla-la...@googlegroups.com.
> To unsubscribe from this group, send email to mozilla-labs-jet...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mozilla-labs-jetpack?hl=.
>
>
>



--
Thomas Bassetto — tb4.fr
Élève-ingénieur de l'INSA de Rouen en Architecture des Systèmes
d'Information — 5ème année
Reply all
Reply to author
Forward
0 new messages