* Add a loader element under the tab page. * * @param {string} tabId
(tabId)
| 498 | * @param {string} tabId |
| 499 | */ |
| 500 | function addLoaderElement(tabId) { |
| 501 | const surface = tfvis.visor().surface( |
| 502 | { name: 'Benchmark Summary', tab: tabId, styles: { width: '100%' } }); |
| 503 | const loaderElement = document.createElement('div'); |
| 504 | loaderElement.className = 'loader'; |
| 505 | loaderElement.id = `${tabId}-loader`; |
| 506 | surface.drawArea.appendChild(loaderElement); |
| 507 | } |
| 508 | |
| 509 | /** |
| 510 | * Remove the loader element under the tab page. |