--- a/editing.html Mon Aug 29 13:02:24 2011 -0600
+++ b/editing.html Mon Aug 29 13:24:16 2011 -0600
@@ -65,7 +65,7 @@
<body class=draft>
<div class=head id=head>
<h1>HTML Editing APIs</h1>
-<h2 class="no-num no-toc" id=work-in-progress-—-last-update-28-august-2011>Work in Progress — Last Update 28 August 2011</h2>
+<h2 class="no-num no-toc" id=work-in-progress-—-last-update-29-august-2011>Work in Progress — Last Update 29 August 2011</h2>
<dl>
<dt>Editor
<dd>Aryeh Gregor <<a href=mailto:ayg@aryeh.name>ayg@aryeh.name</a>>
@@ -9044,6 +9044,14 @@
wrapper.appendChild(button);
wrapper.appendChild(node);
});
+document.body.onclick = function(e) {
+ [].forEach.call(document.querySelectorAll(".comments-expanded"), function(node) {
+ if (e.target != node.parentNode
+ && !(e.target.compareDocumentPosition(node.parentNode) & Node.DOCUMENT_POSITION_CONTAINS)) {
+ node.className = "comments";
+ }
+ });
+};
</script>
<script src=http://www.whatwg.org/specs/web-apps/current-work/dfn.js></script>
--- a/source.html Mon Aug 29 13:02:24 2011 -0600
+++ b/source.html Mon Aug 29 13:24:16 2011 -0600
@@ -9123,6 +9123,14 @@
wrapper.appendChild(button);
wrapper.appendChild(node);
});
+document.body.onclick = function(e) {
+ [].forEach.call(document.querySelectorAll(".comments-expanded"), function(node) {
+ if (e.target != node.parentNode
+ && !(e.target.compareDocumentPosition(node.parentNode) & Node.DOCUMENT_POSITION_CONTAINS)) {
+ node.className = "comments";
+ }
+ });
+};
<!-- @} -->
</script>
<script src=http://www.whatwg.org/specs/web-apps/current-work/dfn.js></script>