[Cosmo-dev] Note: dojo.html.common

Matthew Eernisse mde at osafoundation.org
Thu Nov 30 15:25:36 PST 2006


Note that we should be requiring dojo.html.common instead of dojo.dom. 
Good to know.

M.

Tom Trenka wrote:
> The dojo.dom module IS NOT the module that you use directly for DOM 
> manipulation in an HTML document.  The dojo.html module (specifically, 
> dojo.html.common) mixes the dojo.dom module into itself a nd then 
> proceeds to override certain methods so that they are specific to HTML 
> documents--including the host environments.  If you are going to make 
> any methods or method changes that seem to be DOM specific but only 
> apply in an HTML environment, you must put them in the dojo.html module.

> In a similar vein, if you are working in an HTML environment and you are 
> looking to use the methods in dojo.dom, all you need to do is require 
> dojo.html.common.  You do not need to require dojo.dom.  It was written 
> this way because Dojo was designed to be used in many different 
> environments, including pure XML-based ones like SVG.  Unless you're 
> working in a non-HTML environment, you should never include dojo.dom 
> directly.
> 
> trt


More information about the cosmo-dev mailing list