121
rated 0 times
[
124]
[
3]
/ answers: 1 / hits: 20696
/ 14 Years ago, sun, january 23, 2011, 12:00:00
Here's the script:
function runScripts() {
if (arguments.length === 0) return;
chrome.tabs.executeScript(null, {
file: arguments[0]
}, function() {
arguments.shift();
runScripts.apply(null, arguments);
});
}
It doesn't work because arguments
is not actually an array, it's just array-like. So how can I shift it or hack off the first element so that I can apply this function recursively?
More From » arrays