()
| 121 | } |
| 122 | |
| 123 | takeAll() { |
| 124 | const bufferedScripts = this._queue |
| 125 | this._queue = [] |
| 126 | if (bufferedScripts.length === 0) { |
| 127 | return undefined |
| 128 | } |
| 129 | // Optimization: if only one script, avoid join |
| 130 | if (bufferedScripts.length === 1) { |
| 131 | return bufferedScripts[0] + ';document.currentScript.remove()' |
| 132 | } |
| 133 | // Append cleanup script and join - avoid push() to not mutate then iterate |
| 134 | return bufferedScripts.join(';') + ';document.currentScript.remove()' |
| 135 | } |
| 136 | |
| 137 | injectBufferedScripts() { |
| 138 | if (this._cleanedUp) return |
no outgoing calls
no test coverage detected