MCPcopy Create free account
hub / github.com/mailru/FileAPI / inject

Function inject

tests/grunt-task/phantomjs/grunt-lib-phantomjs-main.js:51–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49// Inject bridge script into client page.
50var injected;
51var inject = function() {
52 if (injected) { return; }
53 // Inject client-side helper script.
54 var scripts = Array.isArray(options.inject) ? options.inject : [options.inject];
55 sendMessage('inject', options.inject);
56 scripts.forEach(page.injectJs);
57 injected = true;
58};
59
60// Keep track if the client-side helper script already has been injected.
61page.onUrlChanged = function(newUrl) {

Callers 1

Calls 1

sendMessageFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…