(node)
| 821 | } |
| 822 | |
| 823 | removeChild(node) { |
| 824 | if (!(node instanceof Node)) return |
| 825 | |
| 826 | const index = this.$_children.indexOf(node) |
| 827 | |
| 828 | if (index >= 0) { |
| 829 | // 已经插入,需要删除 |
| 830 | this.$_children.splice(index, 1) |
| 831 | |
| 832 | node.$$updateParent(null) |
| 833 | |
| 834 | // 更新映射表 |
| 835 | this.$_updateChildrenExtra(node, true) |
| 836 | |
| 837 | // 触发 webview 端更新 |
| 838 | this.$_triggerMeUpdate() |
| 839 | } |
| 840 | |
| 841 | return node |
| 842 | } |
| 843 | |
| 844 | insertBefore(node, ref) { |
| 845 | if (!(node instanceof Node)) return |
no test coverage detected