dom - Is it safe to modify the document Object in javascript? -



dom - Is it safe to modify the document Object in javascript? -

i'm wondering if can modify document object this, guarantee existence of document.getelementsbyclassname(), or if there limitation on modifying document in browsers:

if(typeof document.getelementsbyclassname !== 'function') document.getelementsbyclassname = function(class_name){ // custom function };

yes, can. document object behaves every other object in javascript, it's extensible.

javascript dom object

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -