MCPcopy Index your code
hub / github.com/prototypejs/prototype / selfOrBody

Function selfOrBody

src/prototype/dom/layout.js:1056–1058  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

1054
1055 // Ensure we never return the root HTML tag.
1056 function selfOrBody(element) {
1057 return isHtml(element) ? $(document.body) : $(element);
1058 }
1059
1060 // For unusual cases like these, we standardize on returning the BODY
1061 // element as the offset parent.

Callers 1

getOffsetParentFunction · 0.85

Calls 2

isHtmlFunction · 0.85
$Function · 0.85

Tested by

no test coverage detected