Status: New
Owner: ----
New issue 623 by bjorn.tipling: Support for non-standard toSource( )
http://code.google.com/p/v8/issues/detail?id=623
Feature request: In Firefox there exists a very helpful method called
toSource. It allows for some
introspection on objects.
On object literals:
var obj = { cow: "moo", dog: "woof" };
obj.toSource( ) //"({cow:"moo", dog:"woof"})"
Array literals:
var ar = [ "a", "b", "c" ];
ar.toSource( ); //"["a", "b", "c"]"
It is helpful for cases when using a logger is not optimal or possible,
such as popup debugging in
Chrome Extension development, fast iteration of big arrays (the deep nested
look ups using the
console.dir method will get slow), handling errors, or where there are bugs
in the console. It's
also sometimes quicker to just add an alert than have to constantly open up
the console, and
toSource makes this a lot less painful. In addition if you're doing a
tutorial or explaining
something to someone who doesn't know what they're doing it's simply easy
to ask them to add a
toSource method than expect them to know how to access a console or what
that is.
Link to MDC about toSource:
https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Objects/Object/ToSource
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev