Open olejorgenb opened 7 years ago
Provide fall back for crashing to string functions. Example:
let monitor_index_for_rect;
if (global.display.get_monitor_index_for_rect) {
// 3.3
monitor_index_for_rect = global.display.get_monitor_index_for_rect.bind(global.display);
} else {
// COMPATIBILITY: 3.28
monitor_index_for_rect = global.screen.get_monitor_index_for_rect.bind(global.screen);
}
monitor_index_for_rect.toString()
// Object 0x7f9640cd2650 is not a subclass of GIRepositoryFunction, it's a Function
Atm. we just do
JSON.stringify
. This works nicely for simple objects like{foo: 1, bar: 2}
and simple arrays, but not GObjects and complex "native" js objects, with constructors, etc.GObjects are handled specially at top level, but not when they're members of a object.
Sometimes weird stuff happens:
unmaximzied_rect
andscore
are not members ofMetaWindow
.MetaWindow
(show title), etc.)