var object = document.createElement('div'); var prototypes = []; var prototype = null; while(prototype = Object.getPrototypeOf(prototype || object)) prototypes.push(prototype.constructor.name) alert(prototypes);