closure/goog/html/sanitizer/noclobber.js
function genericMethodCall(fn, object, fallbackMethodName, args) {
  if (fn) {
    return fn.apply(object, args);
  }
  // IE8 and IE9 will return 'object' for
  // CSSStyleDeclaration.(get|set)Attribute, so we can't use typeof.
  if (userAgentProduct.IE && document.documentMode < 10) {
    if (!object[fallbackMethodName].call) {
      throw new Error('IE Clobbering detected');
    }
  } else if (typeof object[fallbackMethodName] != 'function') {
    throw new Error('Clobbering detected');
  }
  return object[fallbackMethodName].apply(object, args);
}
function genericMethodCall(fn, object, fallbackMethodName, args) {
  if (fn) {
    return fn.apply(object, args);
  }
  // IE8 and IE9 will return 'object' for
  // CSSStyleDeclaration.(get|set)Attribute, so we can't use typeof.
  if (userAgentProduct.IE && document.documentMode < 10) {
    if (!object[fallbackMethodName].call) {
      throw new Error('IE Clobbering detected');
    }
  } else if (typeof object[fallbackMethodName] != 'function') {
    throw new Error('Clobbering detected');
  }
  return object[fallbackMethodName].apply(object, args);
}
function genericMethodCall ( fn , object , fallbackMethodName , args ) { if ( fn ) { return fn . apply ( object , args ) ; } // IE8 and IE9 will return 'object' for // CSSStyleDeclaration.(get|set)Attribute, so we can't use typeof. if ( userAgentProduct . IE && document . documentMode < 10 ) { if ( ! object [ fallbackMethodName ] . call ) { throw new Error ( 'IE Clobbering detected' ) ; } } else if ( typeof object [ fallbackMethodName ] != 'function' ) { throw new Error ( 'Clobbering detected' ) ; } return object [ fallbackMethodName ] . apply ( object , args ) ; }
Calls the provided DOM prototype method and returns its result. If the
method is not available, use fallbackMethodName to call the method in a
clobber-vulnerable way, and use fallbackTest to check if the
method was clobbered, throwing an exception if so.
@param {?Function} fn
@param {*} object
@param {string} fallbackMethodName
@param {!Array<*>} args
@return {?}
Calls the provided DOM prototype method and returns its result . If the method is not available use fallbackMethodName to call the method in a clobber - vulnerable way and use fallbackTest to check if the method was clobbered throwing an exception if so .