blob: 00315a38c068842ea6685e97ff34be4ea9e2d21b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
let Endless;
function _init() {
// this is imports.gi.Endless
Endless = this;
// Override Endless.PageManager.add() so that you can set child properties
// at the same time
Endless.PageManager.prototype._add_real = Endless.PageManager.prototype.add;
Endless.PageManager.prototype.add = function(child, props) {
this._add_real(child);
if(typeof(props) !== 'undefined') {
for(let prop_id in props) {
this.child_set_property(child, prop_id, props[prop_id]);
}
}
}
}
|