Re: libseed-list js-level reflection of "system" objects
- From: "Alan Knowles" <alan akbkhome com>
- To: "Alexey Zakhlestin" <libseed-list-bounces gnome org>
- Cc: libseed-list gnome org
- Subject: Re: libseed-list js-level reflection of "system" objects
- Date: Thu, 03 Jun 2010 22:38:49 +0800
There is not much in the way of hidden 'built-in' properties. Seed's really just Webkit's JS engine with about 4 extensions, and gobject introspection.
AFAIK the base Javascript does not have any 'hidden' properties. However, the introspected bindings do have quite a bit of hidden information, which can often cause problems when introspected using 'for (i in object) {...}'
You can use the GIRepository bindings to query all of that
For console.dump() - which is close to console.dir - This is pretty basic implementation.
http://git.akbkhome.com/?p=app.Builder.js;a=blob;f=console.js
usage is pretty simple
console = imports.console;
console.dump(yourobject)
Regards
Alan
--- On 03/Jun/2010, Alexey Zakhlestin wrote:
> Hi.
>
> Does Seed provide some js-API for reflecting hidden properties of objects?
>
> Node.js provides: sys.inspect(object, showHidden, depth) for these purposes
> http://nodejs.org/api.html#sys-inspect-77
>
> Common.JS defines console.dir(object) which seems to do the trick too
> http://wiki.commonjs.org/wiki/Console
>
>
> p.s. on a more generic topicâ?¦ are there plans for implementing Common.JS specs?
>
>
> --
> Alexey Zakhlestin
> http://www.milkfarmsoft.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]