MCPcopy
hub / github.com/greensock/GSAP / _createElement

Function _createElement

esm/MotionPathHelper.js:28–32  ·  view source on GitHub ↗
(type, ns)

Source from the content-addressed store, hash-verified

26 return typeof value === "string";
27},
28 _createElement = function _createElement(type, ns) {
29 var e = _doc.createElementNS ? _doc.createElementNS((ns || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), type) : _doc.createElement(type); //some servers swap in https for http in the namespace which can break things, making "style" inaccessible.
30
31 return e.style ? e : _doc.createElement(type); //some environments won't allow access to the element's style when created with a namespace in which case we default to the standard createElement() to work around the issue. Also note that when GSAP is embedded directly inside an SVG file, createElement() won't allow access to the style object in Firefox (see https://gsap.com/forums/topic/20215-problem-using-tweenmax-in-standalone-self-containing-svg-file-err-cannot-set-property-csstext-of-undefined/).
32},
33 _getPositionOnPage = function _getPositionOnPage(target) {
34 var bounds = target.getBoundingClientRect(),
35 windowOffsetY = _docEl.clientTop - (_win.pageYOffset || _docEl.scrollTop || _body.scrollTop || 0),

Callers 2

_initCopyToClipboardFunction · 0.70
MotionPathHelperFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…