I’ve used this simple technique to get a native DOM element in jQuery:
var el = $('#myid');
var native = el[0]; //or el.get(0);
How can I do this in YUI 3? For example, I want to use getElementsByName DOM method, which is not supported by YUI 3.
If you can’t be confident that ‘#myid’ is in the DOM then you should check for null first. YUI’s .one doesn’t chain like in jQuery.