Skip to content

Executing JS <script> that has been inserted with an ajax call ? #2352

Discussion options

You must be logged in to vote

I've found a way 🥳

#adapted from: https://stackoverflow.com/a/72276629/11943028

def FunctionCompleted(req):
    document['aDIV'].append(document.createRange().createContextualFragment(req.text))

it just work ! I have no ideas why !? because I don't get the purpose of createRange

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BobSquarePants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant