MCPcopy
hub / github.com/ryanseddon/react-frame-component / getMountTarget

Method getMountTarget

src/Frame.jsx:75–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73 }
74
75 getMountTarget() {
76 const doc = this.getDoc();
77
78 if (!doc || !doc.body) {
79 return null;
80 }
81
82 if (this.props.mountTarget) {
83 return doc.querySelector(this.props.mountTarget);
84 }
85
86 return doc.body.children[0];
87 }
88
89 setRef = (node) => {
90 this.nodeRef.current = node;

Callers 2

renderFrameContentsMethod · 0.95
Frame.spec.jsxFile · 0.80

Calls 1

getDocMethod · 0.95

Tested by

no test coverage detected