docs: function() {
  				var _ = this._,
  					frameElement = CKEDITOR.document.getById( _.frameId ),
  					frameDocument = frameElement.getFrameDocument(),
  					elementDefinition = _.definition,
  					buttons = _.buttons,
  					callNumber = this.formLoadedNumber,
  					unloadNumber = this.formUnloadNumber,
  					langDir = _.dialog._.editor.lang.dir,
  					langCode = _.dialog._.editor.langCode;
  
  				// The callback function for the iframe, but we must call tools.addFunction only once
  				// so we store the function number in this.formLoadedNumber
  				if ( !callNumber ) {
  					callNumber = this.formLoadedNumber = CKEDITOR.tools.addFunction( function() {
  						// Now we can apply the events to the input type=file
  						this.fire( 'formLoaded' );
  					}, this );
  
  					// Remove listeners attached to the content of the iframe (the file input)
  					unloadNumber = this.formUnloadNumber = CKEDITOR.tools.addFunction( function() {
  						this.getInputElement().clearCustomData();
  					}, this );
  
  					this.getDialog()._.editor.on( 'destroy', function() {
  						CKEDITOR.tools.removeFunction( callNumber );
  						CKEDITOR.tools.removeFunction( unloadNumber );
  					} );
  				}
  
  				function generateFormField() {
  					frameDocument.$.open();
  
  					var size = '';
  					if ( elementDefinition.size )
  						size = elementDefinition.size - ( CKEDITOR.env.ie ? 7 : 0 ); // "Browse" button is bigger in IE.
  
  					var inputId = _.frameId + '_input';
  
  					frameDocument.$.write( [
  						'<html dir="' + langDir + '" lang="' + langCode + '"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">',
  							'<form enctype="multipart/form-data" method="POST" dir="' + langDir + '" lang="' + langCode + '" action="',
  								CKEDITOR.tools.htmlEncode( elementDefinition.action ),
  							'">',
  								// Replicate the field label inside of iframe.
  								'<label id="', _.labelId, '" for="', inputId, '" style="display:none">',
  									CKEDITOR.tools.htmlEncode( elementDefinition.label ),
  								'</label>',
  								// Set width to make sure that input is not clipped by the iframe (#11253).
  								'<input style="width:100%" id="', inputId, '" aria-labelledby="', _.labelId, '" type="file" name="',
  									CKEDITOR.tools.htmlEncode( elementDefinition.id || 'cke_upload' ),
  									'" size="',
  									CKEDITOR.tools.htmlEncode( size > 0 ? size : "" ),
  								'" />',
  							'</form>',
  						'</body></html>',
  						'<script>',
  							// Support for custom document.domain in IE.
  							CKEDITOR.env.ie ? '(' + CKEDITOR.tools.fixDomain + ')();' : '',
  
  							'window.parent.CKEDITOR.tools.callFunction(' + callNumber + ');',
  							'window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction(' + unloadNumber + ')}',
  						'</script>'
  					].join( '' ) );
  
  					frameDocument.$.close();
  
  					for ( var i = 0; i < buttons.length; i++ )
  						buttons[ i ].enable();
  				}
  
  				// #3465: Wait for the browser to finish rendering the dialog first.
  				if ( CKEDITOR.env.gecko )
  					setTimeout( generateFormField, 500 );
  				else
  					generateFormField();
  			}