For 2 days I've been looking an answer, but I can't find a good solution to my problem.
What I'm trying to achieve is to add an
While creating an element, setting the attributes and appending it to the document kind of worked, the beforeSend headers weren't set on the AJAX calls in the
I suddenly realised that I could try a simple
document.write() within a script tag. Turns out that it works like a charm.
(I can't believe I couldn't come up with this solution earlier)