Re: GJS BOF: Day 1



I've tried to answer but I've got a filter notification due 40K+ chars (I guess I shouldn't have included the original message) so I'll reply again.

About node abstracting:
https://github.com/nodejs/node/pull/4765

Already working for Chakra:
https://github.com/nodejs/node-chakracore

There is a project from Mozilla too:
https://github.com/mozilla/spidernode#spidernode-nodejs-on-spidermonkey

About Babel, jsgtk already uses babel standalone to bring ES6 features in moz24.
If you want to play with it, install it via:

sh -c "$(curl -fsSL https://webreflection.github.io/jsgtk/install)"


About classes, jsgtk already supports them out of the box.

Example:

```js
#!/usr/bin/env jsgtk
const Gtk = require('Gtk');
Gtk.init(null);

class HewlloWorld extends Gtk.Window {
    constructor() {
        super({
            title: 'jsgtk',
            type: Gtk.WindowType.TOPLEVEL,
            windowPosition: Gtk.WindowPosition.CENTER
        });
        this.once('show', () => {
            this.setKeepAbove(true);
            Gtk.main();
        })
        .on('destroy', Gtk.mainQuit)
        .add(new Gtk.Label({label: 'Hello jsGtk+'}));
        this.setDefaultSize(200, 80);
        this.showAll();
    }
}

new HewlloWorld();
```

Best Regards


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