Re: libseed-list use of javascriptcore objects/methods



XMLHTTPRequest is not a feature of JavaScript, it is functionality exposed by the browser /through/ JS. As Seed does not run within a browser, it does not include this functionality.

You might want to look at the libsoup bindings. I believe the seed-examples repo includes an example of this, but I don't remember.

—Tim

On Mar 25, 2011, at 12:04, Jeremy Volkening <volkening mailshack com> wrote:

> Hello,
> 
> I recently discovered Seed when looking into porting an extension to the
> Epiphany browser. I've worked out the basics and managed some working
> code, but I'm running into trouble trying to use what seem like "core"
> JavaScript objects (I say "seem like" because I'm more or less new to
> JavaScript, although I'm comfortable writing Gtk+ apps in other OO
> languages).
> 
> As an example, I get an error when trying to create an XMLHttpRequest
> object:
> 
> var req = new XMLHttpRequest();
> 
> throws
> 
> "ReferenceError Can't find variable: XMLHttpRequest"
> 
> I assume this means I don't have the proper libraries loaded, although
> from what I've read XMLHttpRequest functionality is available in WebKit.
> I'm' not really even sure if it's reasonable to try and do this from
> within the extension - as I said, I'm just starting out with
> JavaScript/Seed. I've searched the mailing list archives and all of the
> documentation I could find. JSCore.EvaluateScript() seemed promising but
> results in a segfault. I'd appreciate any help to point me in the right
> direction.
> 
> Jeremy
> 
> 
> _______________________________________________
> libseed-list mailing list
> libseed-list gnome org
> http://mail.gnome.org/mailman/listinfo/libseed-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]