aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-04-08 20:59:40 +0100
committerMichael Williamson <mike@zwobble.org>2013-04-08 20:59:40 +0100
commit3170803959a8264afb5088946bd8015869531906 (patch)
tree64f73949428f0c57f69bb9c36e53a31d194ec213 /lib
parentb4e24fbcb96743e7a81156526ef4e994f4af20e4 (diff)
Clarify the meaning of element in HtmlGenerator
Diffstat (limited to 'lib')
-rw-r--r--lib/html-generator.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/html-generator.js b/lib/html-generator.js
index c866051..3825f9b 100644
--- a/lib/html-generator.js
+++ b/lib/html-generator.js
@@ -47,12 +47,12 @@ function HtmlGenerator() {
}
function stylePartMatchesStackElement(stylePart, stackElement) {
- return stackElement && stylePart.tagName === stackElement.element.tagName;
+ return stackElement && stylePart.tagName === stackElement.htmlPathElement.tagName;
}
function open(element) {
stack.push({
- element: element,
+ htmlPathElement: element,
written: false
});
}
@@ -60,7 +60,7 @@ function HtmlGenerator() {
function close() {
var stackElement = stack.pop();
if (stackElement.written) {
- fragments.push(util.format("</%s>", stackElement.element.tagName));
+ fragments.push(util.format("</%s>", stackElement.htmlPathElement.tagName));
}
}
@@ -78,9 +78,9 @@ function HtmlGenerator() {
function writeElement(stackElement) {
stackElement.written = true;
- var element = stackElement.element;
- var attributeString = generateAttributeString(element.attributes)
- fragments.push(util.format("<%s%s>", element.tagName, attributeString));
+ var htmlPathElement = stackElement.htmlPathElement;
+ var attributeString = generateAttributeString(htmlPathElement.attributes)
+ fragments.push(util.format("<%s%s>", htmlPathElement.tagName, attributeString));
}
function selfClosing(element) {