1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-04 16:04:11 +01:00

Replace Array.slice conversions of the arguments object with rest parameters.

This commit is contained in:
Doug Kearns
2013-09-05 20:46:21 +10:00
parent e0a0388382
commit 99bfcbf2fc
16 changed files with 82 additions and 93 deletions

View File

@@ -389,10 +389,10 @@ Controller.prototype = {
* @param {...} Extra arguments are passed to the completion
* function directly.
*/
testCompleter: wrapAssertNoErrors(function testCompleter(self, func, string, message) {
testCompleter: wrapAssertNoErrors(function testCompleter(self, func, string, message, ...args) {
var context = this.modules.CompletionContext(string || "");
context.tabPressed = true;
context.forkapply("completions", 0, self, func, Array.slice(arguments, testCompleter.length));
context.forkapply("completions", 0, self, func, args);
utils.assert("dactyl.runCompletions", context.wait(5000),
message || "Completion failed: " + self + "." + func);