[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

Firefox: "window -> about:home"

ram

5/26/2015 8:33:00 PM

I have a browser that is called "Firefox".
It has a JavaScript console (Ctrl-Shift-K).

When I enter (<) »window«, then it outputs (>)
»window -> about:home«:

< window
> window -> about:home

. Where does »about:home« come frome?

It is not window.toString() nor window.title. What
is the general rule that explains how the string
that is written on the right side of the arrow is
determined?

Is there a general rule, how this console displays
an object? For example, »window« is an object, and
it is displayed as »window -> about:home« with an arrow.
»window.history« also is an object, but it is displayed as

< window.history
> History { length: 2, state: null }

.

2 Answers

Thomas 'PointedEars' Lahn

5/26/2015 10:14:00 PM

0

Stefan Ram wrote:

> I have a browser that is called "Firefox".
> It has a JavaScript console (Ctrl-Shift-K).

You want to stop assuming that your audience is stupid.

> When I enter (<) »window«, then it outputs (>)
> »window -> about:home«:

The character â??>â? is commonly used for showing the quotation level. When
quoting from the console, it is prudent to use the third-party quotation
character, â??|â?, and use â??>>>â? to indicate the input as well.

> < window
>> window -> about:home
>
> . Where does »about:home« come frome?

It is the URI of the built-in â??My Homepageâ? document as selected in the
Preferences.

> It is not window.toString() nor window.title.

Of course not. It is the value of window.location.href or
window.location.toString() with respect to that document.

> What is the general rule that explains how the string
> that is written on the right side of the arrow is
> determined?

UTSL.

> Is there a general rule, how this console displays
> an object?

UTSL. And fix your punctuation: lines are not supposed to begin with a
period.

> For example, »window« is an object, and
> it is displayed as »window -> about:home« with an arrow.
> »window.history« also is an object, but it is displayed as
>
> < window.history
>> History { length: 2, state: null }

ISTM that the display is determined by usefulness.

--
PointedEars
FAQ: <http://PointedEars.... | SVN: <http://PointedEars.de...
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-...
Please do not cc me. / Bitte keine Kopien per E-Mail.

Michael Haufe (\"TNO\")

5/26/2015 10:28:00 PM

0

On Tuesday, May 26, 2015 at 3:32:41 PM UTC-5, Stefan Ram wrote:
> I have a browser that is called "Firefox".
> It has a JavaScript console (Ctrl-Shift-K).
>
> When I enter (<) »window«, then it outputs (>)
> »window -> about:home«:
>
> < window
> > window -> about:home
>
> . Where does »about:home« come frome?
>
> It is not window.toString() nor window.title. What
> is the general rule that explains how the string
> that is written on the right side of the arrow is
> determined?
>
> Is there a general rule, how this console displays
> an object? For example, »window« is an object, and
> it is displayed as »window -> about:home« with an arrow.
> »window.history« also is an object, but it is displayed as
>
> < window.history
> > History { length: 2, state: null }
>
> .

My assumption is that it is using console.info(object) [1]

[1] https://developer.mozilla.org/en-US/docs/Web/A...