Commit ee144a8
Fix anchor links for React-rendered API method headers
The MethodHeader React component renders h2 headings with anchor links,
but these appear after React island hydration. The initCodeBlocks script
that sets up anchor link icons was running before hydration completed.
Added a MutationObserver to detect when new .sl-anchor-link elements are
added to the DOM and re-run the initialization to set up the dual-icon
structure (link icon + checkmark for copy feedback).
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent 6bac8fe commit ee144a8
1 file changed
+29
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
186 | 215 | | |
187 | 216 | | |
188 | 217 | | |
| |||
0 commit comments