Re: RFR: 8356276: JavaScript error in script.js after JDK-8348282

2025-05-06 Thread Hannes Wallnöfer
On Tue, 6 May 2025 15:16:16 GMT, Chen Liang wrote: > The js part looks good. Is the Java code just trivial cleanup and doesn't > affect correctness of this patch? Exactly, it's just to copy CSS and JS files each in their own method. Thanks for the quick review! - PR Comment: http

Re: RFR: 8356276: JavaScript error in script.js after JDK-8348282

2025-05-06 Thread Chen Liang
On Tue, 6 May 2025 14:57:20 GMT, Hannes Wallnöfer wrote: > Please review a simple fix to avoid a JavaScript error in API docs when > syntax highlighting is not enabled. > > The fix consists in replacing `(hljs)` with `(typeof hljs !== "undefined")` > in the `if` statement as the former throws

RFR: 8356276: JavaScript error in script.js after JDK-8348282

2025-05-06 Thread Hannes Wallnöfer
Please review a simple fix to avoid a JavaScript error in API docs when syntax highlighting is not enabled. The fix consists in replacing `(hljs)` with `(typeof hljs !== "undefined")` in the `if` statement as the former throws a `TypeError` if `hljs` is undefined. The `try-catch` wrapper arou