( child: Instance, container: Container, before: Instance )
| 99 | } |
| 100 | |
| 101 | export function insertChildToContainer( |
| 102 | child: Instance, |
| 103 | container: Container, |
| 104 | before: Instance |
| 105 | ) { |
| 106 | const beforeIndex = container.children.indexOf(before); |
| 107 | if (beforeIndex === -1) { |
| 108 | throw new Error('before不存在'); |
| 109 | } |
| 110 | const index = container.children.indexOf(child); |
| 111 | if (index !== -1) { |
| 112 | container.children.splice(index, 1); |
| 113 | } |
| 114 | container.children.splice(beforeIndex, 0, child); |
| 115 | } |
| 116 | |
| 117 | export const scheduleMicroTask = |
| 118 | typeof queueMicrotask === 'function' |
nothing calls this directly
no outgoing calls
no test coverage detected