closure/goog/html/sanitizer/noclobber.js
function genericPropertyGet(fn, object, fallbackPropertyName, fallbackTest) {
  if (fn) {
    return fn.apply(object);
  }
  var propertyValue = object[fallbackPropertyName];
  if (!fallbackTest(propertyValue)) {
    throw new Error('Clobbering detected');
  }
  return propertyValue;
}
function genericPropertyGet(fn, object, fallbackPropertyName, fallbackTest) {
  if (fn) {
    return fn.apply(object);
  }
  var propertyValue = object[fallbackPropertyName];
  if (!fallbackTest(propertyValue)) {
    throw new Error('Clobbering detected');
  }
  return propertyValue;
}
function genericPropertyGet ( fn , object , fallbackPropertyName , fallbackTest ) { if ( fn ) { return fn . apply ( object ) ; } var propertyValue = object [ fallbackPropertyName ] ; if ( ! fallbackTest ( propertyValue ) ) { throw new Error ( 'Clobbering detected' ) ; } return propertyValue ; }
Calls the provided DOM property descriptor and returns its result. If the
descriptor is not available, use fallbackPropertyName to get the property
value in a clobber-vulnerable way, and use fallbackTest to check if the
property was clobbered, throwing an exception if so.
@param {?Function} fn
@param {*} object
@param {string} fallbackPropertyName
@param {function(*):boolean} fallbackTest
@return {?}
Calls the provided DOM property descriptor and returns its result . If the descriptor is not available use fallbackPropertyName to get the property value in a clobber - vulnerable way and use fallbackTest to check if the property was clobbered throwing an exception if so .