(containerEl: QContainerElement)
| 54 | }; |
| 55 | |
| 56 | const resolveContainer = (containerEl: QContainerElement) => { |
| 57 | if (containerEl._qwikjson_ === undefined) { |
| 58 | const parentJSON = containerEl === doc.documentElement ? doc.body : containerEl; |
| 59 | let script = parentJSON.lastElementChild; |
| 60 | while (script) { |
| 61 | if (script.tagName === 'SCRIPT' && script.getAttribute('type') === 'qwik/json') { |
| 62 | containerEl._qwikjson_ = JSON.parse( |
| 63 | script.textContent!.replace(/\\x3C(\/?script)/gi, '<$1') |
| 64 | ); |
| 65 | break; |
| 66 | } |
| 67 | script = script.previousElementSibling; |
| 68 | } |
| 69 | } |
| 70 | }; |
| 71 | |
| 72 | const createEvent = <T extends CustomEvent = any>(eventName: string, detail?: T['detail']) => |
| 73 | new CustomEvent(eventName, { |
no test coverage detected
searching dependent graphs…