views:

123

answers:

2

Could somebody explain what is the meaning of DomHelper in google closure?

What is it for and how it may be useful?

Thanks!

edit: Here is a more detailed answer

A: 

Assuming you are referring to goog.dom.DomHelper - it looks like it provides an efficient, cross-browser solution to DOM manipulation.

Justin Ethier
thanks. there's dom_helper optional parameter everywhere, what is it for?
Evgeny
Do you have an example?
Justin Ethier
turns out it's a reference to an alternative dom object that javascript has access to - like the one from another frame
Evgeny
it's not necessary if you have a single frameless page
Evgeny
+2  A: 

DomHelper offers similar functionality to that provided by static utility methods within goog.dom. The difference is that a DomHelper instance can be bound to a document object corresponding to a different window, such as an IFrame, or the parent frame. This basically allows UI controls to conduct their DOM manipulations within the confines of the correct window, even if the actual objects live in another.

levik