(options)
| 84 | } |
| 85 | } |
| 86 | const render = (options) => { |
| 87 | if (options.domNode) { |
| 88 | system.render(options.domNode, "App") |
| 89 | } else if (options.dom_id) { |
| 90 | const domNode = document.querySelector(options.dom_id) |
| 91 | system.render(domNode, "App") |
| 92 | } else if (options.dom_id === null || options.domNode === null) { |
| 93 | /** |
| 94 | * noop |
| 95 | * |
| 96 | * SwaggerUI instance can be created without any rendering involved. |
| 97 | * This is also useful for lazy rendering or testing. |
| 98 | */ |
| 99 | } else { |
| 100 | console.error("Skipped rendering: no `dom_id` or `domNode` was specified") |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | // if no configUrl is provided, we can safely persist the configs and render |
| 105 | if (!mergedOptions.configUrl) { |
no test coverage detected
searching dependent graphs…