MCPcopy Index your code
hub / github.com/SortableJS/Sortable / lastChild

Function lastChild

Sortable.js:377–383  ·  view source on GitHub ↗

* Gets the last child in the el, ignoring ghostEl or invisible elements (clones) * @param {HTMLElement} el Parent element * @param {selector} selector Any other elements that should be ignored * @return {HTMLElement} The last child, ignoring ghostEl

(el, selector)

Source from the content-addressed store, hash-verified

375 * @return {HTMLElement} The last child, ignoring ghostEl
376 */
377 function lastChild(el, selector) {
378 var last = el.lastElementChild;
379 while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
380 last = last.previousElementSibling;
381 }
382 return last || null;
383 }
384
385 /**
386 * Returns the index of an element within its parent for a selected set of

Callers 3

Sortable.jsFile · 0.70
_ghostIsLastFunction · 0.70

Calls 2

cssFunction · 0.70
matchesFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…