gjs 1.49.90
- From: Philip Chimento <install-module master gnome org>
- To: FTP Releases <ftp-release-list gnome org>
- Subject: gjs 1.49.90
- Date: Mon, 7 Aug 2017 23:05:03 +0000 (UTC)
About gjs
=========
GNOME JavaScript/Spidermonkey bindings
News
====
- New API: GObject.registerClass(), intended for use with ES6 classes. When
defining a GObject class using ES6 syntax, you must call
GObject.registerClass() on the class object, with an optional metadata
object as the first argument. (The metadata object works exactly like the
meta properties from Lang.Class, except that Name and Extends are not
present.)
Old:
var MyClass = new Lang.Class({
Name: 'MyClass',
Extends: GObject.Object,
Signals: { 'event': {} },
_init(props={}) {
this._private = [];
this.parent(props);
},
});
New:
var MyClass = GObject.registerClass({
Signals: { 'event': {} },
}, class MyClass extends GObject.Object {
_init(props={}) {
this._private = [];
super._init(props);
}
});
It is forward compatible with the following syntax requiring decorators and
class fields, which are not in the JS standard yet:
@GObject.registerClass
class MyClass extends GObject.Object {
static [GObject.signals] = { 'event': {} }
_init(props={}) {
this._private = [];
super._init(props);
}
}
One limitation is that GObject ES6 classes can't have constructor()
methods, they must do any setup in an _init() method. This may be able to be
fixed in the future.
- Closed bugs:
* Misc 1.49 and mozjs52 enhancements [#785040, Philip Chimento]
* Switch to native promises [#784713, Philip Chimento]
* Can't call exports using top-level variable toString [#781623, Philip
Chimento]
* Properties no longer recognized when shadowed by a method [#785091, Philip
Chimento, Rico Tzschichholz]
* Patch: backport of changes required for use with mozjs-55 [#785424, Luke
Jones]
Version 1.48.6
--------------
- Closed bugs:
* GJS crash in needsPostBarrier, possible access from wrong thread [#783935,
Philip Chimento] (again)
Download
========
https://download.gnome.org/sources/gjs/1.49/gjs-1.49.90.tar.xz (603K)
sha256sum: 389fd81d1e2126aaabd6ddfb29e8ae5a20fefb40da1dfb2c6610494f243c26df
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]