Hey folks,
I stole the nice mermaid theme component and modified it to include RapiDoc as a web component. It allows for rendering OpenAPI specs.
When clicking an operation in the web component, it sometimes freezes up the browser and I have a hard time figuring out what’s happening.
Only closing the tab helps. This does not happen with the same RapiDoc version and the same OpenAPI spec when embedded in other pages.
What it does is that it adds the operation’s id as an anchor to the URL,e.g. _https://my-site/t/my-topic/150#post-/clusters/-clusterID-/gateway
. I guess there’s something listening to URL changes that fails in this case, maybe b/c the web component is not yet fully rendered and/or the ID cannot be found in the shadow DOM.
I saw the following on the console:
Promise Rejection: SyntaxError: '#main #put-/clusters/-clusterID-/appliances/-applianceID-/constraints, a[name=put-/clusters/-clusterID-/appliances/-applianceID-/constraints]' is not a valid selector.
The inserted element carrying the ID corresponding to the anchor in the URL looks like this.
<section
part="section-endpoint"
id="patch-/clusters/-clusterID-"
class="m-endpoint regular-font patch collapsed">
Does anyone have any pointers for me to get to the core of the issue?
Thanks a ton!