MCPcopy
hub / github.com/swagger-api/swagger-ui / render

Function render

src/core/index.js:86–102  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

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) {

Calls 1

renderMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…