File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,14 @@ class Node extends EventDispatcher {
8787 */
8888 this . global = false ;
8989
90+ /**
91+ * Create a list of parents for this node during the build process.
92+ *
93+ * @type {boolean }
94+ * @default false
95+ */
96+ this . parents = false ;
97+
9098 /**
9199 * This flag can be used for type testing.
92100 *
@@ -643,6 +651,14 @@ class Node extends EventDispatcher {
643651
644652 if ( childNode && childNode . isNode === true ) {
645653
654+ if ( childNode . parents === true ) {
655+
656+ const childProperties = builder . getNodeProperties ( childNode ) ;
657+ childProperties . parents = childProperties . parents || [ ] ;
658+ childProperties . parents . push ( this ) ;
659+
660+ }
661+
646662 childNode . build ( builder ) ;
647663
648664 }
You can’t perform that action at this time.
0 commit comments