Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[] (0) fix how we talk about objects that implement the [] syntax. gr…
…ammar fix. support rel=sidebar and <base>; window, frames, self; length, opener, window[]. all very much WIP.

git-svn-id: http://svn.whatwg.org/webapps@668 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Mar 6, 2007
1 parent 9fc7343 commit c2ebc3f
Show file tree
Hide file tree
Showing 2 changed files with 148 additions and 36 deletions.
101 changes: 80 additions & 21 deletions index
Expand Up @@ -1170,7 +1170,10 @@
<li><a href="#auxillary"><span class=secno>5.7. </span>Auxillary
browsing contexts</a>
<ul class=toc>
<li><a href="#browsing"><span class=secno>5.7.1. </span>Browsing
<li><a href="#accessing"><span class=secno>5.7.1. </span>Accessing
other browsing contexts</a>

<li><a href="#browsing"><span class=secno>5.7.2. </span>Browsing
context names</a>
</ul>
</ul>
Expand Down Expand Up @@ -2625,14 +2628,15 @@

<p>If no such elements are found, then the method must return null.

<p>In the ECMAScript DOM binding, objects implementing the <code><a
href="#htmlcollection0">HTMLCollection</a></code> interface must support
being dereferenced using the square bracket notation, such that
dereferencing with an integer index is equivalent to invoking the <code
title=dom-HTMLCollection-item><a href="#itemindex">item()</a></code>
method with that index, and such that dereferencing with a string index is
equivalent to invoking the <code title=dom-HTMLCollection-namedItem><a
href="#nameditem">namedItem()</a></code> method with that index.
<p>In ECMAScript implementations, objects that implement the <code><a
href="#htmlcollection0">HTMLCollection</a></code> interface must also have
a [[Get]] method that, when invoked with a property name that is a number,
acts like the <code title=dom-HTMLCollection-item><a
href="#itemindex">item()</a></code> method would when invoked with that
argument, and when invoked with a property name that is a string, acts
like the <code title=dom-HTMLCollection-namedItem><a
href="#nameditem">namedItem()</a></code> method would when invoked with
that argument.

<h5 id=htmlformcontrolscollection><span class=secno>2.3.1.2.
</span>HTMLFormControlsCollection</h5>
Expand Down Expand Up @@ -21317,15 +21321,34 @@ JSURI: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
navigating a particular browsing context, then that is the browsing
context that must be navigated.

<p>Otherwise, if the hyperlink element is a <code><a
<p>Otherwise, if the hyperlink element is an <code><a
href="#a0">a</a></code> or <code><a href="#area0">area</a></code> element
and has a <code title=attr-hyperlink-target><a
that has a <code title=attr-hyperlink-target><a
href="#target3">target</a></code> attribute, then the browsing context
that is navigated must be chosen by applying <a href="#the-rules">the
rules for chosing a browsing context given a browsing context name</a>,
using the value of the <code title=attr-hyperlink-target><a
href="#target3">target</a></code> attribute as the browsing context name.

<p>Otherwise, if the hyperlink element is a <a href="#sidebar1"
title=rel-sidebar-hyperlink>sidebar hyperlink</a> and the user agent
implements a feature that can be considered a secondary browsing context,
such a secondary browsing context may be selected as the browsing context
to be navigated.

<p>Otherwise, if the hyperlink element is an <code><a
href="#a0">a</a></code> or <code><a href="#area0">area</a></code> element
with no <code title=attr-hyperlink-target><a
href="#target3">target</a></code> attribute, but there is a <code><a
href="#base0">base</a></code> element with a <code
title=attr-base-target><a href="#target">target</a></code> attribute in
the document, then the browsing context that is navigated must be chosen
by applying <a href="#the-rules">the rules for chosing a browsing context
given a browsing context name</a>, using the value of the <code
title=attr-base-target><a href="#target">target</a></code> attribute of
the first such <code><a href="#base0">base</a></code> element as the
browsing context name.

<p>Otherwise, the browsing context that must be navigated is the same
browsing context as the one which the hyperlink element itself is in.

Expand Down Expand Up @@ -22098,6 +22121,11 @@ mpt says:
to be shown in a secondary browsing context (if possible), instead of in
the current browsing context.

<p>A <a href="#hyperlinks" title=hyperlink>hyperlink element</a> with with
the <code title=rel-sidebar><a href="#sidebar0">sidebar</a></code> keyword
specified is a <dfn id=sidebar1 title=rel-sidebar-hyperlink>sidebar
hyperlink</dfn>.

<h5 id=link-type15><span class=secno>4.3.3.17. </span>Link type "<dfn
id=tag0 title=rel-tag><code>tag</code></dfn>"</h5>

Expand Down Expand Up @@ -22974,13 +23002,17 @@ mpt says:
DOMString <span title=dom-prompt>prompt</span>(in DOMString message);
DOMString <span title=dom-prompt>prompt</span>(in DOMString message, in DOMString default);

// auxillary browsing contexts
// browsing contexts
readonly attribute <span>Window</span> <a href="#window" title=dom-window>window</a>;
readonly attribute <span>Window</span> <a href="#frames" title=dom-frames>frames</a>;
readonly attribute <span>Window</span> <a href="#self" title=dom-self>self</a>;
readonly attribute unsigned long <a href="#length5" title=dom-length>length</a>;
readonly attribute <span>Window</span> <a href="#opener" title=dom-opener>opener</a>;
<span>Window</span> <a href="#window.open" title=dom-open>open</a>();
<span>Window</span> <a href="#window.open" title=dom-open>open</a>(in DOMString url);
<span>Window</span> <a href="#window.open" title=dom-open>open</a>(in DOMString url, in DOMString target);
<span>Window</span> <a href="#window.open" title=dom-open>open</a>(in DOMString url, in DOMString target, in DOMString features);
<span>Window</span> <a href="#window.open" title=dom-open>open</a>(in DOMString url, in DOMString target, in DOMString features, in DOMString replace);
readonly attribute <span>Window</span> <a href="#opener" title=dom-opener>opener</a>;
};</pre>
<!-- XXX XMLHttpRequest
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_window.asp
Expand Down Expand Up @@ -23030,6 +23062,9 @@ mpt says:
argument processing</span>
</dl>

<p class=note><code>Window</code> objects also <a href="#get"
title=dom-item>have an implicit [[Get]] method</a>.

<h3 id=history><span class=secno>5.2. </span>Session history and navigation</h3>

<h4 id=the-session><span class=secno>5.2.1. </span>The <dfn
Expand Down Expand Up @@ -23235,7 +23270,7 @@ mpt says:
agent must translate this action into the equivalent invocations of the
<code title=dom-history-go><a href="#godelta">history.go(<var
title="">delta</var>)</a></code> method on the various affected <code
title=dom-window>window</code> objects.
title=dom-window><a href="#window">window</a></code> objects.

<p>Some of the other members of the <code><a
href="#history1">History</a></code> interface are defined in terms of the
Expand Down Expand Up @@ -25018,10 +25053,34 @@ MAYBE WANT
title="">replace</var> is true, then <a href="#replacement"
title="replacement enabled">replacement must be enabled</a>.

<p class=big-issue>The <dfn id=opener
title=dom-opener><code>opener</code></dfn> DOM attribute...
<h4 id=accessing><span class=secno>5.7.1. </span>Accessing other browsing
contexts</h4>

<p>The <dfn id=opener title=dom-opener><code>opener</code></dfn> DOM
attribute on the <code>Window</code> object must return the
<code>Window</code> object of the browsing context from which the current
browsing context was created, if there is one and it is still available.

<p>In ECMAScript implementations, objects that implement the <code><a
href="#windowhtml">WindowHTML</a></code> interface must also have a <dfn
id=get title=dom-item>[[Get]]</dfn> method that, when invoked with a
property name that is a number <var title="">i</var>, returns the <var
title="">i</var>th <span>child browsing context</span><!-- XXX
xref -->
of the current <code>Document</code>.

<p>The <dfn id=length5 title=dom-length><code>length</code></dfn> DOM
attribute on the <code><a href="#windowhtml">WindowHTML</a></code>
interface must return the number of <span title="child browsing
context">child browsing contexts</span><!-- XXX xref --> of the current
<code>Document</code>.

<p>The <dfn id=window title=dom-window><code>window</code></dfn>, <dfn
id=frames title=dom-frames><code>frames</code></dfn>, <dfn id=self
title=dom-self><code>self</code></dfn> DOM attributes must all return the
<code>Window</code> object itself.

<h4 id=browsing><span class=secno>5.7.1. </span>Browsing context names</h4>
<h4 id=browsing><span class=secno>5.7.2. </span>Browsing context names</h4>

<p>A <dfn id=valid7>valid browsing context name</dfn> is any string that
does not start with a U+005F LOW LINE character, or, a string that
Expand Down Expand Up @@ -26505,7 +26564,7 @@ http://developer.apple.com/documentation/AppleApplications/Conceptual/SafariJSPr
void <a href="#clearundo" title=dom-UndoManager-clearUndo>clearUndo</a>();
void <a href="#clearredo" title=dom-UndoManager-clearRedo>clearRedo</a>();
DOMObject <a href="#itemn" title=dom-UndoManager-item>item</a>(in unsigned long index);
readonly attribute unsigned long <a href="#length5" title=dom-UndoManager-length>length</a>;
readonly attribute unsigned long <a href="#length6" title=dom-UndoManager-length>length</a>;
readonly attribute unsigned long <a href="#position0" title=dom-UndoManager-position>position</a>;
};</pre>

Expand All @@ -26531,7 +26590,7 @@ http://developer.apple.com/documentation/AppleApplications/Conceptual/SafariJSPr
entries are absent from the <a href="#undo-transaction">undo transaction
history</a>.

<p>The <dfn id=length5
<p>The <dfn id=length6
title=dom-UndoManager-length><code>length</code></dfn> attribute must
return the number of <a href="#undo-object">undo object</a> entries in the
<a href="#undo-transaction">undo transaction history</a>.
Expand All @@ -26555,7 +26614,7 @@ http://developer.apple.com/documentation/AppleApplications/Conceptual/SafariJSPr
nearest to the <a href="#current2">undo position</a>, on the "redo" side.
If there are no <a href="#undo-object">undo object</a> entries on the
"redo" side, then the attribute must return the same as the <code
title=dom-UndoManager-length><a href="#length5">length</a></code>
title=dom-UndoManager-length><a href="#length6">length</a></code>
attribute. If there are no <a href="#undo-object">undo object</a> entries
on the "undo" side of the <a href="#current2">undo position</a>, the <code
title=dom-UndoManager-position><a href="#position0">position</a></code>
Expand Down Expand Up @@ -26602,7 +26661,7 @@ http://developer.apple.com/documentation/AppleApplications/Conceptual/SafariJSPr
href="#undo-object">undo object</a> entry with the specified <var
title="">index</var>. If the index is less than zero or greater than or
equal to <code title=dom-UndoManager-length><a
href="#length5">length</a></code> then the method must raise an
href="#length6">length</a></code> then the method must raise an
<code>INDEX_SIZE_ERR</code> exception. <a href="#dom-changes">DOM
changes</a> entries are unaffected by this method.

Expand Down
83 changes: 68 additions & 15 deletions source
Expand Up @@ -1287,15 +1287,14 @@
<p>If no such elements are found, then the method must return
null.</p>

<p>In the ECMAScript DOM binding, objects implementing the
<code>HTMLCollection</code> interface must support being
dereferenced using the square bracket notation, such that
dereferencing with an integer index is equivalent to invoking the
<code title="dom-HTMLCollection-item">item()</code> method with that
index, and such that dereferencing with a string index is equivalent
to invoking the <code
title="dom-HTMLCollection-namedItem">namedItem()</code> method with
that index.</p>
<p>In ECMAScript implementations, objects that implement the
<code>HTMLCollection</code> interface must also have a [[Get]]
method that, when invoked with a property name that is a number,
acts like the <code title="dom-HTMLCollection-item">item()</code>
method would when invoked with that argument, and when invoked with
a property name that is a string, acts like the <code
title="dom-HTMLCollection-namedItem">namedItem()</code> method would
when invoked with that argument.</p>



Expand Down Expand Up @@ -19131,15 +19130,32 @@ JSURI: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
hyperlinks by navigating a particular browsing context, then that is
the browsing context that must be navigated.</p>

<p>Otherwise, if the hyperlink element is a <code>a</code> or
<code>area</code> element and has a <code
<p>Otherwise, if the hyperlink element is an <code>a</code> or
<code>area</code> element that has a <code
title="attr-hyperlink-target">target</code> attribute, then the
browsing context that is navigated must be chosen by applying
<span>the rules for chosing a browsing context given a browsing
context name</span>, using the value of the <code
title="attr-hyperlink-target">target</code> attribute as the
browsing context name.</p>

<p>Otherwise, if the hyperlink element is a <span
title="rel-sidebar-hyperlink">sidebar hyperlink</span> and the user
agent implements a feature that can be considered a secondary
browsing context, such a secondary browsing context may be selected
as the browsing context to be navigated.</p>

<p>Otherwise, if the hyperlink element is an <code>a</code> or
<code>area</code> element with no <code
title="attr-hyperlink-target">target</code> attribute, but there is
a <code>base</code> element with a <code
title="attr-base-target">target</code> attribute in the document,
then the browsing context that is navigated must be chosen by
applying <span>the rules for chosing a browsing context given a
browsing context name</span>, using the value of the <code
title="attr-base-target">target</code> attribute of the first such
<code>base</code> element as the browsing context name.</p>

<p>Otherwise, the browsing context that must be navigated is the
same browsing context as the one which the hyperlink element itself
is in.</p>
Expand Down Expand Up @@ -19817,6 +19833,10 @@ mpt says:
in a secondary browsing context (if possible), instead of in the
current browsing context.</p>

<p>A <span title="hyperlink">hyperlink element</span> with with the
<code title="rel-sidebar">sidebar</code> keyword specified is a <dfn
title="rel-sidebar-hyperlink">sidebar hyperlink</dfn>.</p>


<h5>Link type "<dfn title="rel-tag"><code>tag</code></dfn>"</h5>

Expand Down Expand Up @@ -20713,13 +20733,17 @@ mpt says:
DOMString <span title="dom-prompt">prompt</span>(in DOMString message);
DOMString <span title="dom-prompt">prompt</span>(in DOMString message, in DOMString default);

// auxillary browsing contexts
// browsing contexts
readonly attribute <span>Window</span> <span title="dom-window">window</span>;
readonly attribute <span>Window</span> <span title="dom-frames">frames</span>;
readonly attribute <span>Window</span> <span title="dom-self">self</span>;
readonly attribute unsigned long <span title="dom-length">length</span>;
readonly attribute <span>Window</span> <span title="dom-opener">opener</span>;
<span>Window</span> <span title="dom-open">open</span>();
<span>Window</span> <span title="dom-open">open</span>(in DOMString url);
<span>Window</span> <span title="dom-open">open</span>(in DOMString url, in DOMString target);
<span>Window</span> <span title="dom-open">open</span>(in DOMString url, in DOMString target, in DOMString features);
<span>Window</span> <span title="dom-open">open</span>(in DOMString url, in DOMString target, in DOMString features, in DOMString replace);
readonly attribute <span>Window</span> <span title="dom-opener">opener</span>;
};</pre>

<!-- XXX XMLHttpRequest
Expand Down Expand Up @@ -20761,6 +20785,9 @@ mpt says:

</dl>

<p class="note"><code>Window</code> objects also <span
title="dom-item">have an implicit [[Get]] method</span>.</p>


<h3 id="history">Session history and navigation</h3>

Expand Down Expand Up @@ -22789,8 +22816,34 @@ MAYBE WANT
<var title="">replace</var> is true, then <span title="replacement
enabled">replacement must be enabled</span>.</p>

<p class="big-issue">The <dfn
title="dom-opener"><code>opener</code></dfn> DOM attribute...</p>


<h4>Accessing other browsing contexts</h4>

<p>The <dfn title="dom-opener"><code>opener</code></dfn> DOM
attribute on the <code>Window</code> object must return the
<code>Window</code> object of the browsing context from which the
current browsing context was created, if there is one and it is
still available.</p>

<p>In ECMAScript implementations, objects that implement the
<code>WindowHTML</code> interface must also have a <dfn
title="dom-item">[[Get]]</dfn> method that, when invoked with a
property name that is a number <var title="">i</var>, returns the
<var title="">i</var>th <span>child browsing context</span><!-- XXX
xref --> of the current <code>Document</code>.</p>

<p>The <dfn title="dom-length"><code>length</code></dfn> DOM
attribute on the <code>WindowHTML</code> interface must return the
number of <span title="child browsing context">child browsing
contexts</span><!-- XXX xref --> of the current
<code>Document</code>.</p>

<p>The <dfn title="dom-window"><code>window</code></dfn>, <dfn
title="dom-frames"><code>frames</code></dfn>, <dfn
title="dom-self"><code>self</code></dfn> DOM attributes must all
return the <code>Window</code> object itself.</p>



<h4>Browsing context names</h4>
Expand Down

0 comments on commit c2ebc3f

Please sign in to comment.