packages/browser/src/loader.js
function(content) {
    // content.e = error
    // content.p = promise rejection
    // content.f = function call the Sentry
    if (
      (content.e ||
        content.p ||
        (content.f && content.f.indexOf('capture') > -1) ||
        (content.f && content.f.indexOf('showReportDialog') > -1)) &&
      lazy
    ) {
      // We only want to lazy inject/load the sdk bundle if
      // an error or promise rejection occured
      // OR someone called `capture...` on the SDK
      injectSdk(onLoadCallbacks);
    }
    queue.data.push(content);
  }
function(content) {
    // content.e = error
    // content.p = promise rejection
    // content.f = function call the Sentry
    if (
      (content.e ||
        content.p ||
        (content.f && content.f.indexOf('capture') > -1) ||
        (content.f && content.f.indexOf('showReportDialog') > -1)) &&
      lazy
    ) {
      // We only want to lazy inject/load the sdk bundle if
      // an error or promise rejection occured
      // OR someone called `capture...` on the SDK
      injectSdk(onLoadCallbacks);
    }
    queue.data.push(content);
  }
function ( content ) { // content.e = error // content.p = promise rejection // content.f = function call the Sentry if ( ( content . e || content . p || ( content . f && content . f . indexOf ( 'capture' ) > - 1 ) || ( content . f && content . f . indexOf ( 'showReportDialog' ) > - 1 ) ) && lazy ) { // We only want to lazy inject/load the sdk bundle if // an error or promise rejection occured // OR someone called `capture...` on the SDK injectSdk ( onLoadCallbacks ) ; } queue . data . push ( content ) ; }
Create a namespace and attach function that will store captured exception Because functions are also objects, we can attach the queue itself straight to it and save some bytes
Create a namespace and attach function that will store captured exception Because functions are also objects we can attach the queue itself straight to it and save some bytes