/*\r
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
CKEDITOR.dialog.add( 'button', function( editor )\r
{\r
delete this.button;\r
var element = this.getParentEditor().getSelection().getSelectedElement();\r
- if ( element && element.getName() == "input" )\r
+ if ( element && element.is( 'input' ) )\r
{\r
var type = element.getAttribute( 'type' );\r
- if ( type == "button" || type == "reset" || type == "submit" )\r
+ if ( type in { button:1, reset:1, submit:1 } )\r
{\r
this.button = element;\r
this.setupContent( element );\r