--- a/source.html Wed Jul 04 15:06:39 2012 -0700
+++ b/source.html Wed Jul 04 15:20:42 2012 -0700
@@ -151,6 +151,28 @@
<code><a href="#attr-undoscope">undoscope</a></code> content attribute is removed and added back to all descendent nodes of the element that have become
non-<a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#editable">editable</a> due to the change.</p>
+ <div class="example">
+ <p>In the following example, Because <code><a href="#dom-undomanager-item">item()</a></code> returns new array on each call,
+ modifying the array does not have any effect on the sequence of <a href="#dom-transaction">DOM transactions</a> of the entry,
+ and two return values of <code><a href="#dom-undomanager-item">item()</a></code> are alwys different objects.</p>
+
+ <pre>
+<div id="container">
+ <div undoscope>This will be editable</div>
+ <div contenteditable undoscope="false">This will remain not editable.</div>
+</div>
+<script>
+var container = document.getElementById('container');
+var children = container.getElementsByTagName('*');
+children[0].undoManager.transact({executeAutomatic: function () {}});
+children[1].undoManager.transact({executeAutomatic: function () {}});
+container.contentEditable = true;
+alert(children[0].undoManager); // Alerts null
+alert(children[1].undoManager.length); // Alerts 1
+</script>
+</pre>
+ </div>
+
<h4>undoScope IDL attribute</h4>
<pre class="idl">partial interface <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-745549614">Element</a> {
--- a/undomanager.html Wed Jul 04 15:06:39 2012 -0700
+++ b/undomanager.html Wed Jul 04 15:20:42 2012 -0700
@@ -179,6 +179,27 @@
<code><a href=#attr-undoscope>undoscope</a></code> content attribute is removed and added back to all descendent nodes of the element that have become
non-<a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#editable>editable</a> due to the change.</p>
+ <div class=example>
+ <p>In the following example, Because <code><a href=#dom-undomanager-item>item()</a></code> returns new array on each call,
+ modifying the array does not have any effect on the sequence of <a href=#dom-transaction>DOM transactions</a> of the entry,
+ and two return values of <code><a href=#dom-undomanager-item>item()</a></code> are alwys different objects.</p>
+
+ <pre><div id="container">
+ <div undoscope>This will be editable</div>
+ <div contenteditable undoscope="false">This will remain not editable.</div>
+</div>
+<script>
+var container = document.getElementById('container');
+var children = container.getElementsByTagName('*');
+children[0].undoManager.transact({executeAutomatic: function () {}});
+children[1].undoManager.transact({executeAutomatic: function () {}});
+container.contentEditable = true;
+alert(children[0].undoManager); // Alerts null
+alert(children[1].undoManager.length); // Alerts 1
+</script>
+</pre>
+ </div>
+
<h4 id=undoscope-idl-attribute><span class=secno>2.2.2 </span>undoScope IDL attribute</h4>
<pre class=idl>partial interface <a href=http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-745549614>Element</a> {