You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncaught TypeError: this is undefined
iFn https://4nf.org/ajaxify.js:79
<anonymous> https://ymp6u.ciroue.com/?reload=1660049574.0162 line 278 > injectedScript:2
_apptxt https://4nf.org/ajaxify.js:278
_addtxt https://4nf.org/ajaxify.js:270
_onetxt https://4nf.org/ajaxify.js:267
a https://4nf.org/ajaxify.js:253
a https://4nf.org/ajaxify.js:326
a https://4nf.org/ajaxify.js:309
_addScripts https://4nf.org/ajaxify.js:281
a https://4nf.org/ajaxify.js:256
_lSel https://4nf.org/ajaxify.js:161
Edit: The problem was solved when I removed addEventListener('DOMContentLoaded', (event) => { and just let the initialization run in <script>. Here is the issue I had: #229
Edit 2: Regarding this issue, maybe custom script execution handler could be allowed (ex. evalScripts(element)). Or to change script execution to one of the other PJAX projects:
Yes, also DOMContentLoaded handling is a pain in the plain vanilla Ajaxify.
I think that is what's causing the problem because of this entry in your error log:
iFn https://4nf.org/ajaxify.js:79
Maybe have a look at this currently closed issue ->
Very interesting - especially the synthetic checking for document.write with match().
However, I would not like to overhaul the complete script handling at the moment...
Hi, I use emoji JS plugin which is correctly re-initialized by ajaxify but CSS of the plugin was broken. So I went to set up PHP testing site to reproduce the issue but encountered JS issue:
Here is code and preview: https://phpsandbox.io/e/x/ymp6u?layout=EditorPreview&defaultPath=%2F&theme=dark&showExplorer=no&openedFiles=
However open directly the URL for JS errors in console: https://ymp6u.ciroue.com/
Edit: The problem was solved when I removed
addEventListener('DOMContentLoaded', (event) => {
and just let the initialization run in<script>
. Here is the issue I had: #229Edit 2: Regarding this issue, maybe custom script execution handler could be allowed (ex. evalScripts(element)). Or to change script execution to one of the other PJAX projects:
MoOx
https://github.com/MoOx/pjax/blob/master/lib/execute-scripts.js
https://github.com/MoOx/pjax/blob/master/lib/eval-script.js
PaperStrike
https://github.com/PaperStrike/Pjax/blob/main/src/libs/executeScripts/Script.ts
https://github.com/PaperStrike/Pjax/blob/main/src/libs/executeScripts/index.ts
Or https://github.com/falsandtru/pjax-api
Or https://stackoverflow.com/questions/1197575/can-scripts-be-inserted-with-innerhtml
The text was updated successfully, but these errors were encountered: