mirror of
https://github.com/ROCm/ROCm.git
synced 2026-02-11 23:15:06 -05:00
15 lines
322 B
JavaScript
15 lines
322 B
JavaScript
export function domReady(callback) {
|
|
if (document.readyState !== "loading") {
|
|
callback();
|
|
} else {
|
|
document.addEventListener("DOMContentLoaded", callback, { once: true });
|
|
}
|
|
}
|
|
|
|
const DEBUG = true;
|
|
export const logDebug = (...args) => {
|
|
if (DEBUG) {
|
|
console.debug("[ROCmDocsSelector]", ...args);
|
|
}
|
|
};
|