spyFunction = function (fnName) {

			var oldFunction = Element.prototype[fnName];

			Element.prototype[fnName] = function () {
				oldFunction.apply(this, arguments);

				/**
				 * If we have 50 new elements in the core, don't send 50 new messages for
				 * dirty state instead wait 500ms and send one message.
				 */
				clearTimeout(that._fnDirtyTimeoutHandle);

				that._fnDirtyTimeoutHandle = setTimeout(function () {
					CommunicationBus.publish(channelNames.ON_CORE_STATE_CHANGE);
				}, iNotifyDirtyStateInterval);
			};
		}
Creates event listeners for new elements that are published by the CommunicationBus.

@private