@@ -134,13 +134,15 export function emptyNode(target: Node) | |||||
134 | */ |
|
134 | */ | |
135 | export function startupWidgets(target: Node | _WidgetBase, skipNode?: Node) { |
|
135 | export function startupWidgets(target: Node | _WidgetBase, skipNode?: Node) { | |
136 | if (isNode(target)) { |
|
136 | if (isNode(target)) { | |
137 | const w = registry.byNode(target); |
|
137 | const w = isElementNode(target) ? registry.byNode(target) : undefined; | |
138 | if (w) { |
|
138 | if (w) { | |
139 |
w.startup |
|
139 | if (w.startup) | |
|
140 | w.startup(); | |||
140 | } else { |
|
141 | } else { | |
141 |
registry.findWidgets(target, skipNode).forEach( |
|
142 | registry.findWidgets(target, skipNode).forEach(x => x.startup()); | |
142 | } |
|
143 | } | |
143 | } else { |
|
144 | } else { | |
144 |
target.startup |
|
145 | if(target.startup) | |
|
146 | target.startup(); | |||
145 | } |
|
147 | } | |
146 | } No newline at end of file |
|
148 | } |
General Comments 0
You need to be logged in to leave comments.
Login now