mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-02 07:21:05 +00:00
Add interactive check to ready event handler (#1672)
If HTMX is imported in a module the readyState is "interactive" so the extension processing happens too late. This would fix it. Co-authored-by: Dave Syer <david_syer@hotmail.com>
This commit is contained in:
parent
295d9f83eb
commit
347ce7a19f
@ -3605,7 +3605,7 @@ return (function () {
|
||||
//====================================================================
|
||||
|
||||
function ready(fn) {
|
||||
if (getDocument().readyState !== 'loading') {
|
||||
if (getDocument().readyState === 'complete') {
|
||||
fn();
|
||||
} else {
|
||||
getDocument().addEventListener('DOMContentLoaded', fn);
|
||||
|
Loading…
x
Reference in New Issue
Block a user