( doc: Document, textContent: string, nonce: string | null, )
| 38 | |
| 39 | /** TODO: Move this to a utils folder and convert to use SafeValues. */ |
| 40 | export function createScript( |
| 41 | doc: Document, |
| 42 | textContent: string, |
| 43 | nonce: string | null, |
| 44 | ): HTMLScriptElement { |
| 45 | const script = doc.createElement('script'); |
| 46 | script.textContent = textContent; |
| 47 | if (nonce) { |
| 48 | script.setAttribute('nonce', nonce); |
| 49 | } |
| 50 | |
| 51 | return script; |
| 52 | } |
| 53 | |
| 54 | function warnIfStateTransferHappened(injector: Injector): void { |
| 55 | const transferStateStatus = injector.get(TRANSFER_STATE_STATUS); |
no test coverage detected
searching dependent graphs…