Opened 10 years ago

Closed 5 years ago

#9867 closed enhancement (wontfix)

hostenv for Seed

Reported by: Bryan Forbes Owned by: Bryan Forbes
Priority: low Milestone: future
Component: Core Version: 1.3.2
Keywords: Seed JavaScriptCore hostenv needsreview Cc:
Blocked By: Blocking:

Description (last modified by Bryan Forbes)

Seed is a library and interpreter, dynamically bridging (through GObjectIntrospection) the WebKit JavaScriptCore engine, with the GNOME platform. (from the linked web page).

I've put together a hostenv + other wrappers for core functions like XHR (using libsoup) and dojo.connect on GObjects (using something similar to dojo._base.event). There are still a couple of things to do, namely figure out how setTimeout and clearTimeout should work with regards to using a GObject.MainLoop (since JavaScriptCore doesn't implement these two functions, it will have to be done using GObject). dojo.connect should also be using GObject.signal_lookup to lookup signals rather than discovering them in seed/signals.js.

To load dojo into a Seed project, you would set up a directory structure like this:

root
- dojotoolkit
-- dojo
- main.js

In main.js, you would put the following:

#!/usr/bin/env seed

Gtk = imports.gi.Gtk;
Gtk.init(Seed.argv);

Seed.include('dojotoolkit/dojo/dojo.js');

dojo.xhrGet({
    url: 'http://www.google.com'
}).addBoth(function(res){
    console.log(res);
    Gtk.main_quit();
});

Gtk.main();

Attachments (1)

Seed.diff (29.7 KB) - added by Bryan Forbes 10 years ago.

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by Bryan Forbes

Attachment: Seed.diff added

comment:1 Changed 10 years ago by Bryan Forbes

Description: modified (diff)

comment:2 Changed 10 years ago by dante

Milestone: tbd1.5

comment:3 Changed 9 years ago by Adam Peller

Milestone: 1.51.6

comment:4 Changed 9 years ago by dante

Milestone: 1.6future
Owner: changed from anonymous to bryanforbes

comment:5 Changed 8 years ago by Chris Mitchell

Owner: changed from bryanforbes to Bryan Forbes

comment:6 Changed 8 years ago by ben hockey

Keywords: needsreview added
Priority: highlow

comment:7 Changed 5 years ago by Colin Snover

Resolution: wontfix
Status: newclosed

I think I can safely say we won’t be doing this.

Note: See TracTickets for help on using tickets.