Skip to content

Injecting Raven using anonymous script no longer works #635

Description

@mlb5000

I remember that just pasting the raven-js code into the Chrome console would cause Raven to be added to window, but now that doesn't work. Even doing something like this doesn't result in window.Raven being defined.

(function(d, s, id){
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)){ return; }
    js = d.createElement(s); js.id = id;
    js.onload = function(){
        // remote script has loaded
    };
    js.src = "//cdn.ravenjs.com/3.1.0/raven.min.js";
    fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'raven-js'));

Is this intended or am I doing something wrong?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions