code: function addListener(element, listener) {
          if(!getObject(element)) {
              throw new Error("Element is not detectable by this strategy.");
          }
  
          function listenerProxy() {
              listener(element);
          }
  
          if(browserDetector.isIE(8)) {
              //IE 8 does not support object, but supports the resize event directly on elements.
              getState(element).object = {
                  proxy: listenerProxy
              };
              element.attachEvent("onresize", listenerProxy);
          } else {
              var object = getObject(element);
              object.contentDocument.defaultView.addEventListener("resize", listenerProxy);
          }
      }
docs: Adds a resize event listener to the element.
  @public
  @param {element} element The element that should have the listener added.
  @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback.