Skip to content

Commit

Permalink
adds compat for YAHOO.util.Dom.firstChild [fix 2528665]
Browse files Browse the repository at this point in the history
  • Loading branch information
msweeney committed Nov 22, 2010
1 parent 179227f commit e8837f1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
8 changes: 6 additions & 2 deletions build/compat/compat-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,10 @@ var hyphenToCamel = function(property) {
};

var Dom = {
_firstChild: function(node) {
return Y.Selector.query('> *', node, true);
},

get: function(el) {
if (el) {
if (el.nodeType || el.item) { // Node, or NodeList
Expand Down Expand Up @@ -792,8 +796,8 @@ var wrapped = {
getPreviousSibling: YUI.DOM.previous,
getNextSiblingBy: YUI.DOM.next,
getNextSibling: YUI.DOM.next,
getFirstChildBy: YUI.DOM.firstChild,
getFirstChild: YUI.DOM.firstChild,
getFirstChildBy: Dom._firstChild,
getFirstChild: Dom._firstChild,
getLastChildBy: YUI.DOM.lastChild,
getLastChild: YUI.DOM.lastChild,
getChildrenBy: YUI.DOM.children,
Expand Down
4 changes: 2 additions & 2 deletions build/compat/compat-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e8837f1

Please sign in to comment.