De l'élément.prototype dans IE7?

Je suis en train de s'étendre à tous les éléments dom, donc je peux obtenir et de retirer leurs enfants. La fonction ci-dessous (fonctionne sous FF et Chrome). Est-t-il un équivalent dans IE7 pour étendre les dom objet?

if (!Element.get) {
Element.prototype.get = function(id) {
    for (var i = 0; i < this.childNodes.length; i++) {
        if (this.childNodes[i].id == id) {
            return this.childNodes[i];
        }
        if (this.childNodes[i].childNodes.length) {
            var ret = this.childNodes[i].get(id);
            if (ret != null) {
                return ret;
            }
        }
    }
    return null;
}
}

Element.prototype.removeChildren = function() {
    removeChildren(this);
}

Merci!

InformationsquelleAutor Brent | 2009-02-28