oh uhhhh.. this seems kind of silly but heres what i did:
Code: Select all
Object.prototype.appendChildren = function ()
{
if (arguments.length == 0)
throw "appendChildren() requires at least one parameter!";
// the magic
if (!(/HTML/.test(this)))
throw "appendChildren must be called from an HTML* object.";
for (var i = 0; i < arguments.length; i++)
this.appendChild(arguments[i]);
}