You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$openApiJson variable inserts the OpenApi json into this data-element.
In JS which runs on load after ajax is this:
const docEl = document.getElementById('thedoc');
if (docEl) {
let strSpec = docEl.dataset.json;
let objSpec = JSON.parse(strSpec);
docEl.loadSpec(objSpec);
}
That works, it loads the spec etc., but only, if I enter the page by browser url, without ajax.
If I´m going through app menu and content is being loaded by ajax, I have to enter that page twice to get Rapidoc rendered. Checking the browser network analysis, at first entry, rapidoc-min.js is loaded, but nothing gets rendered, I have to click menu again to load the page for second time to get the Rapidoc rendered.
It seems I need to somehow call "render Rapidoc" on the element manually from my JS, but I can´t find how?
Activity