﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
12769	CKEDITOR.tools.indexOf should allow to find functions within arrays	Marek Lewandowski		"CKEDITOR.tools.indexOf should allow to find functions within arrays

Currently if you'll pass a function to {{{CKEDITOR.tools.indexOf}}}, it will be treated as an evaluator.

It makes finding functions in an array impossible.

== Proposal:

IMHO priority is to keep backward compatibility. I think we might fix it by adding a param like bool `preventEvaluator`.

If it's set to `true` then `value` won't be treated as an evaluator.

== TC:

{{{
'test indexOf': function() {
	var stack = [],
		needle = function( foo ) {
			return 'bar';
		};

	// Push one dummy funciton.
	stack.push( function() {
	} );

	// Push needle.
	stack.push( needle );

	// Note that stack.indexOf( needle ) returns 1.
	assert.areSame( 1, CKEDITOR.tools.indexOf( stack, needle ), 'Return value' );
},
}}}

**Expected result:**[[BR]]
{{{1}}}

**Current result:**[[BR]]
{{{0}}}
"	Bug	closed	Normal		General		wontfix		
