(el: any, callback: any)
| 71 | * el.componentOnReady yourself. |
| 72 | */ |
| 73 | export const componentOnReady = (el: any, callback: any) => { |
| 74 | if (el.componentOnReady) { |
| 75 | // eslint-disable-next-line custom-rules/no-component-on-ready-method |
| 76 | el.componentOnReady().then((resolvedEl: any) => callback(resolvedEl)); |
| 77 | } else { |
| 78 | raf(() => callback(el)); |
| 79 | } |
| 80 | }; |
| 81 | |
| 82 | /** |
| 83 | * This functions checks if a Stencil component is using |
no test coverage detected