Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async injectScript #46

Open
ghost opened this issue Mar 7, 2014 · 0 comments
Open

async injectScript #46

ghost opened this issue Mar 7, 2014 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 7, 2014

In this function

function injectScript(src){
var s, t;
s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = src;
t = document.getElementsByTagName('script')[0];
t.parentNode.insertBefore(s,t);
}

t is currently 'Undefined' so I cannot get the parentNode of it.

I am trying to use it like this

define([ 'jquery', 'jasmineJquery', 'require', 'async!http://maps.google.com/maps/api/js?sensor=false'], function(){
describe("Google test", function () {
it("should not throw exception ", function () {
.................
})
})
});

and run using sbt jasmine command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants