lib/wed/polyfills/firstElementChild_etc.js
function addChildrenToPrototype(p) {
    // Unfortunately, it is not possible to emulate the liveness of the
    // HTMLCollection this property *should* provide.
    Object.defineProperty(p, "children", {
      get: function children() {
        var ret = [];
        var el = this.firstElementChild;
        while (el) {
          ret.push(el);
          el = el.nextElementSibling;
        }

        return ret;
      },
    });
  }
function addChildrenToPrototype(p) {
    // Unfortunately, it is not possible to emulate the liveness of the
    // HTMLCollection this property *should* provide.
    Object.defineProperty(p, "children", {
      get: function children() {
        var ret = [];
        var el = this.firstElementChild;
        while (el) {
          ret.push(el);
          el = el.nextElementSibling;
        }

        return ret;
      },
    });
  }
function addChildrenToPrototype ( p ) { // Unfortunately, it is not possible to emulate the liveness of the // HTMLCollection this property *should* provide. Object . defineProperty ( p , "children" , { get : function children ( ) { var ret = [ ] ; var el = this . firstElementChild ; while ( el ) { ret . push ( el ) ; el = el . nextElementSibling ; } return ret ; } , } ) ; }
We separate children from the rest because it is possible to have firstElementChild, etc defined and yet not have children defined. Go figure...
We separate children from the rest because it is possible to have firstElementChild etc defined and yet not have children defined . Go figure ...