MCPcopy
hub / github.com/jsdoc/jsdoc / setParent

Method setParent

lib/jsdoc/tutorial.js:59–69  ·  view source on GitHub ↗

* Moves children from current parent to different one. * * @param {?Tutorial} parent - New parent. If null, the tutorial has no parent.

(parent)

Source from the content-addressed store, hash-verified

57 * @param {?Tutorial} parent - New parent. If null, the tutorial has no parent.
58 */
59 setParent(parent) {
60 // removes node from old parent
61 if (this.parent) {
62 removeChild(this.parent, this);
63 }
64
65 this.parent = parent;
66 if (parent) {
67 addChild(parent, this);
68 }
69 }
70
71 /* eslint-disable class-methods-use-this */
72 /**

Callers 4

removeChildMethod · 0.80
addChildMethod · 0.80
resolver.jsFile · 0.80
tutorial.jsFile · 0.80

Calls 2

addChildFunction · 0.85
removeChildFunction · 0.70

Tested by

no test coverage detected