public/ckeditor/4.4dev/core/selection.js
function( element ) {
			var editor = this.root.editor;

			// Cleanup after previous selection - e.g. remove hidden sel container.
			this.reset();

			hideSelection( editor );

			// Set this value after executing hiseSelection, because it may
			// cause reset() which overwrites cache.
			var cache = this._.cache;

			// Caches a range than holds the element.
			var range = new CKEDITOR.dom.range( this.root );
			range.setStartBefore( element );
			range.setEndAfter( element );
			cache.ranges = new CKEDITOR.dom.rangeList( range );

			// Put this element in the cache.
			cache.selectedElement = cache.startElement = element;
			cache.type = CKEDITOR.SELECTION_ELEMENT;

			// Properties that will not be available when isFake.
			cache.selectedText = cache.nativeSel = null;

			this.isFake = 1;
			this.rev = nextRev++;

			// Save this selection, so it can be returned by editor.getSelection().
			editor._.fakeSelection = this;

			// Fire selectionchange, just like a normal selection.
			this.root.fire( 'selectionchange' );
		}
function( element ) {
			var editor = this.root.editor;

			// Cleanup after previous selection - e.g. remove hidden sel container.
			this.reset();

			hideSelection( editor );

			// Set this value after executing hiseSelection, because it may
			// cause reset() which overwrites cache.
			var cache = this._.cache;

			// Caches a range than holds the element.
			var range = new CKEDITOR.dom.range( this.root );
			range.setStartBefore( element );
			range.setEndAfter( element );
			cache.ranges = new CKEDITOR.dom.rangeList( range );

			// Put this element in the cache.
			cache.selectedElement = cache.startElement = element;
			cache.type = CKEDITOR.SELECTION_ELEMENT;

			// Properties that will not be available when isFake.
			cache.selectedText = cache.nativeSel = null;

			this.isFake = 1;
			this.rev = nextRev++;

			// Save this selection, so it can be returned by editor.getSelection().
			editor._.fakeSelection = this;

			// Fire selectionchange, just like a normal selection.
			this.root.fire( 'selectionchange' );
		}
function ( element ) { var editor = this . root . editor ; // Cleanup after previous selection - e.g. remove hidden sel container. this . reset ( ) ; hideSelection ( editor ) ; // Set this value after executing hiseSelection, because it may // cause reset() which overwrites cache. var cache = this . _ . cache ; // Caches a range than holds the element. var range = new CKEDITOR . dom . range ( this . root ) ; range . setStartBefore ( element ) ; range . setEndAfter ( element ) ; cache . ranges = new CKEDITOR . dom . rangeList ( range ) ; // Put this element in the cache. cache . selectedElement = cache . startElement = element ; cache . type = CKEDITOR . SELECTION_ELEMENT ; // Properties that will not be available when isFake. cache . selectedText = cache . nativeSel = null ; this . isFake = 1 ; this . rev = nextRev ++ ; // Save this selection, so it can be returned by editor.getSelection(). editor . _ . fakeSelection = this ; // Fire selectionchange, just like a normal selection. this . root . fire ( 'selectionchange' ) ; }
Makes a "fake selection" of an element.

A fake selection does not render UI artifacts over the selected
element. Additionally, the browser native selection system is not
aware of the fake selection. In practice, the native selection is
moved to a hidden place where no native selection UI artifacts are
displayed to the user.

@param {CKEDITOR.dom.element} element The element to be "selected".
Makes a fake selection of an element .