PDA

View Full Version : Accessing DOM methods through Element?



thejoker101
23 Oct 2006, 6:45 AM
Is there a way to get access to the DOM methods and properties of a node through element?

For example:
document.getElementById('node').disabled or
document.getElementById('node').checked

I thought I saw something in the Extensions code something like
YAHOO.ext.Element.get('node').dom.disabled

Is this the proper way to do this? If so, it doesn't seem to be documented so I wasn't sure.

Thanks for clarification.

jack.slocum
23 Oct 2006, 1:54 PM
Yes, the dom property gives access to the raw node. interesting it doesn't appear in the documentation since it looks like this:



/**
* The DOM element
* @type HTMLElement
*/
this.dom = dom;


Good ole JSDoc must be ignoring it.