#2514: the code should try to use Array.indexOf if it does exist
-------------------------------+--------------------------------------------
Reporter: alfonsoml | Owner: arczi
Type: Bug | Status: new
Priority: Normal | Milestone: CKEditor 3.x
Component: General | Version: SVN
Keywords: Confirmed Review- |
-------------------------------+--------------------------------------------
Changes (by fredck):
* keywords: Confirmed Review? => Confirmed Review-
* owner: => arczi
Comment:
Being this executed once only, when loading the code, it would be
acceptable to have the {{{( [].indexOf )}}} check only (please add a
comment about it, so we can understand the reason why). We don't need the
Array.indexOf check then.
You can also use a
[https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Operators/Special_Operators/Conditional_Operator
conditional operator], instead of a private function to simplify the code.
Something like this:
{{{
indexOf :
[].indexOf ?
function( array, entry )
{
...
}
:
function( array, entry )
{
...
}
}}}
Check CKEDITOR.dom.element.getComputedStyle for an example.
--
Ticket URL: <http://dev.fckeditor.net/ticket/2514#comment:7>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac