As a "best practice" for interface developers, is it bad to use the "control" property to reference a Javascript object?
Here is a link to the corresponding property:
https://developer.mozilla.org/en/XUL/Property/control
I have seen many Javascript functions that reference DOM elements using selectors, and then perform DOM manipulations this way. But what if we start by going through the DOM tree and first we have a DOM element?
EDIT 1
Well, it seems that there is some interest here, but for some reason there are no contributions. It started as a conversation between me and my colleague. He was worried about circular links and possible cases of link loss ... is this applicable here? I thought that until we call delete <javascript object>, then we are fine.
EDIT 2 I found this: JQuery methods and DOM properties
In my world, I now use the Microsoft AJAX library, where we created several ScriptControl and place them on different pages; which, in turn, (ScriptControls) receive "modified" page events, and sometimes other ScriptControl events. When pages need to do something with the DOM element, Javascript will use the appropriate Javascript Object methods.
, , JQuery ( ), DOM, .get(0), JQuery ( ).
, , , :(
, , , .