vendor/FontLoader.js
function SizeWatcher(element, options) {
		this._element = element;
		this._delegate = options.delegate;
		this._size = null;
		this._continuous = !!options.continuous;
		this._direction = options.direction ? options.direction : SizeWatcher.directions.both;
		this._dimension = options.dimension ? options.dimension : SizeWatcher.dimensions.both;
		this._sizeIncreaseWatcherContentElm = null;
		this._sizeDecreaseWatcherElm = null;
		this._sizeIncreaseWatcherElm = null;
		this._state = SizeWatcher.states.initialized;
		
		this._generateScrollWatchers(options.size);
		this._appendScrollWatchersToElement(options.container);
	}
function SizeWatcher(element, options) {
		this._element = element;
		this._delegate = options.delegate;
		this._size = null;
		this._continuous = !!options.continuous;
		this._direction = options.direction ? options.direction : SizeWatcher.directions.both;
		this._dimension = options.dimension ? options.dimension : SizeWatcher.dimensions.both;
		this._sizeIncreaseWatcherContentElm = null;
		this._sizeDecreaseWatcherElm = null;
		this._sizeIncreaseWatcherElm = null;
		this._state = SizeWatcher.states.initialized;
		
		this._generateScrollWatchers(options.size);
		this._appendScrollWatchersToElement(options.container);
	}
SizeWatcher observes size of an element and notifies when its size is changed. It doesn't use any timeouts
to check the element size, when change in size occurs a callback method immediately invoked.

To watch for element's size changes the element, and other required elements are appended to a container element
you specify, and which must be added to the DOM tree before invoking prepareForWatch() method. Your container
element should be positioned outside of client's visible area. Therefore you shouldn't use SizeWatcher to watch
for size changes of elements used for UI.
Such container element could be a simple <div> that is a child of the <body> element:
<div style="position:absolute; left:-10000px; top:-10000px;"></div>

You must invoke SizeWatcher's methods in a specific order to establish size change listeners:

1. Create SizeWatcher instance by invoke SizeWatcher constructor passing the element (size of which you want to
observe), the container element, the delegate object and optional size parameter of type Size which should be
the pre-calculated initial size of your element.
4. Invoke prepareForWatch() method. This method will calculate element size if you didn't passed it to the constructor.
5. Invoke beginWatching() method. This method will set event listeners and invoke your delegate's method once
element size changes.

Failing to invoke above methods in their predefined order will throw an exception.

@param {HTMLElement} element An element, size of which will be observed for changes.
@param {Object}      options
@param {HTMLElement} options.container An element to which special observing elements will be added. Must be in DOM tree
when prepareForWatch() method is called.
@param {Object}      options.delegate A delegate object with a sizeWatcherChangedSize method which will be invoked, in
context of the delegate object, when change in size occurs. This method is invoked with single
parameter which is the current SizeWatcher instance.
@param {Size}        [options.size] The pre-calculated initial size of your element. When passed, the element is not
asked for offsetWidth and offsetHeight, which may be useful to reduce browser's CSS
recalculations. If you will not pass the size parameter then its size calculation will be
deferred to prepareForWatch() method.
@param {Boolean}     [options.continuous=false] A boolean flag indicating if the SizeWatcher will watch only for
the first size change (default) or will continuously watch for size changes.
@param {Number}      [options.direction=SizeWatcher.directions.both] The direction of size change that should be
watched: SizeWatcher.directions.increase, SizeWatcher.directions.decrease or
SizeWatcher.directions.both
@param {Number}      [options.dimension=SizeWatcher.dimensions.both] The dimension of size change that should be
watched: SizeWatcher.dimensions.horizontal, SizeWatcher.dimensions.vertical or
SizeWatcher.dimensions.both
@constructor