CMunger.munge Member

Syntax

object.munge(text, containerTag, data);

Arguments

ArgumentSummary
text
containerTag
data

Returns

Remarks

See Also

Source Code

function mng_munge(text, containerTag, data)
{
if (!containerTag)
containerTag = document.createElementNS(XHTML_NS, this.tagName);
// Starting from the top, for each valid priority, check all the rules,
// return as soon as something matches.
if (this.enabled)
{
for (var i = this.entries.length - 1; i >= 0; i--)
{
if (i in this.entries)
{
if (this.mungePriority(i, text, containerTag, data))
return containerTag;
}
}
}
// If nothing matched, we don't have to do anything,
// just insert text (if any).
if (text)
this.insertPlainText(text, containerTag, data);
return containerTag;
}