spanEl.textContent = opt_dictionary.textContent;
if (opt_dictionary.parent)
opt_dictionary.parent.appendChild(spanEl);
+ if (opt_dictionary.bold)
+ spanEl.style.fontWeight = 'bold';
}
return spanEl;
};
return spanEl;
}
+ function isElementAttachedToDocument(el) {
+ var cur = el;
+ while (cur.parentNode)
+ cur = cur.parentNode;
+ return cur == el.ownerDocument;
+ }
+
return {
createSpan: createSpan,
createDiv: createDiv,
createScopedStyle: createScopedStyle,
createSelector: createSelector,
- createCheckBox: createCheckBox
+ createCheckBox: createCheckBox,
+ isElementAttachedToDocument: isElementAttachedToDocument
};
});