Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. (function() {
  2. addLateLoadEvent(throwFrameLoaded);
  3. // find if padding is needed
  4. var pad = (isMSIE6 || isMSIE7 || navigator.userAgent.indexOf('MSIE 8') != -1) ? 1 : 0;
  5.  
  6. function throwFrameLoaded() {
  7. try {
  8. if (window.parent.CustomEvent) {
  9. // history suggests that if we don't size it down on page load,
  10. // when we check the height it will show the previous page's height
  11. window.parent.CustomEvent.fire('content_frame.loaded', self.name, 10);
  12. window.parent.CustomEvent.fire('content_frame.loaded', self.name, getPageHeight());
  13. }
  14. } catch (e) {}
  15. }
  16.  
  17. function throwFrameSized() {
  18. try {
  19. if (window.parent.CustomEvent) {
  20. // IE9/IE10: resize events will be continuously triggered when there is a difference between document.body.scrollHeight and window.frameElement.height
  21. // to solve this issue, we do not fire event if the height we are going to set is the same as the height obtained after the previous fired event
  22. var previousHeig
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement