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

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

ms access - C# - Using OleDbParameter on table name -