go.tools: sync play.js with go.talks

R=golang-dev
CC=golang-dev
https://golang.org/cl/14167044
This commit is contained in:
Andrew Gerrand 2013-10-01 10:43:07 +10:00
parent c92471fb85
commit c635598ddf
2 changed files with 14 additions and 12 deletions

View File

@ -13,14 +13,15 @@ function initPlayground(transport) {
var s = "";
for (var i = 0; i < node.childNodes.length; i++) {
var n = node.childNodes[i];
if (n.nodeType === 1 && n.tagName === "SPAN" && n.className != "number") {
var innerText = n.innerText === undefined ? "textContent" : "innerText";
s += n[innerText] + "\n";
if (n.nodeType !== 1) continue;
if (n.tagName === "BUTTON") continue;
if (n.tagName === "SPAN" && n.className === "number") continue;
if (n.tagName === "PRE"){
s += text(n);
continue;
}
if (n.nodeType === 1 && n.tagName !== "BUTTON") {
s += text(n);
}
var innerText = n.innerText === undefined ? "textContent" : "innerText";
s += n[innerText] + "\n";
}
return s;
}

View File

@ -847,14 +847,15 @@ function initPlayground(transport) {
var s = "";
for (var i = 0; i < node.childNodes.length; i++) {
var n = node.childNodes[i];
if (n.nodeType === 1 && n.tagName === "SPAN" && n.className != "number") {
var innerText = n.innerText === undefined ? "textContent" : "innerText";
s += n[innerText] + "\n";
if (n.nodeType !== 1) continue;
if (n.tagName === "BUTTON") continue;
if (n.tagName === "SPAN" && n.className === "number") continue;
if (n.tagName === "PRE"){
s += text(n);
continue;
}
if (n.nodeType === 1 && n.tagName !== "BUTTON") {
s += text(n);
}
var innerText = n.innerText === undefined ? "textContent" : "innerText";
s += n[innerText] + "\n";
}
return s;
}