Bugfix: AJAX_TOKEN with document.currentScript
This commit is contained in:
parent
ea5be6d383
commit
4f65434628
3 changed files with 2 additions and 1 deletions
|
@ -142,6 +142,7 @@ class Js2PyInterpreter(Interpreter):
|
||||||
window.encodeURIComponent = function(_s){ };
|
window.encodeURIComponent = function(_s){ };
|
||||||
window.document = { };
|
window.document = { };
|
||||||
document.doctype = { };
|
document.doctype = { };
|
||||||
|
document.currentScript = { };
|
||||||
document.getElementById = function(_s){ };
|
document.getElementById = function(_s){ };
|
||||||
''')
|
''')
|
||||||
|
|
||||||
|
|
1
python_aternos/data/package-lock.json
generated
1
python_aternos/data/package-lock.json
generated
|
@ -4,7 +4,6 @@
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "data",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"vm2": "^3.9.13"
|
"vm2": "^3.9.13"
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ const vm = new VM({
|
||||||
document: {
|
document: {
|
||||||
getElementById: (_i) => {},
|
getElementById: (_i) => {},
|
||||||
doctype: {},
|
doctype: {},
|
||||||
|
currentScript: {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
Reference in a new issue