Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Resources

Resources Class

Hierarchy

  • Resources

Index

Constructors

constructor

Properties

Private _failedXHR

_failedXHR: any[]

Private _pendingXHR

_pendingXHR: any[]

Private _receivedXHR

_receivedXHR: any[]

Private _waitForCallbacks

_waitForCallbacks: Function[]

Methods

add

  • add(resource: any, url: string, isJSONP?: boolean, useDataCache?: boolean): void
  • Public API

    Parameters

    • resource: any
    • url: string
    • Default value isJSONP: boolean = false
    • Default value useDataCache: boolean = true

    Returns void

Private attemptToTriggerWaitFor

  • attemptToTriggerWaitFor(): void
  • Private Helpers

    Returns void

Private cloneXHR

  • cloneXHR(xhr: any): any
  • Parameters

    • xhr: any

    Returns any

getFailedXHRList

  • getFailedXHRList(): any[]
  • Returns any[]

getPendingXHRList

  • getPendingXHRList(): any[]
  • Returns any[]

getReceivedXHRList

  • getReceivedXHRList(): any[]
  • Returns any[]

Private hasRecentlyReceivedResource

  • hasRecentlyReceivedResource(currentResources: any[], previousResources: any[], filter: function): boolean
  • Parameters

    • currentResources: any[]
    • previousResources: any[]
    • filter: function
        • (value: any, index: number, array: any[]): boolean
        • Parameters

          • value: any
          • index: number
          • array: any[]

          Returns boolean

    Returns boolean

Private onResourceFailed

  • onResourceFailed(resource: any, response: any, useDataCache: boolean): void
  • Parameters

    • resource: any
    • response: any
    • useDataCache: boolean

    Returns void

Private onResourceReceived

  • onResourceReceived(resource: any, response: any, useDataCache: boolean): void
  • Parameters

    • resource: any
    • response: any
    • useDataCache: boolean

    Returns void

Private removeResourceFromPending

  • removeResourceFromPending(resource: any): void
  • Parameters

    • resource: any

    Returns void

waitForQuiteNetwork

  • waitForQuiteNetwork(callback: Function, filter?: function): void
  • Parameters

    • callback: Function
    • Default value filter: function = () => true
        • (value: any, index: number, array: any[]): boolean
        • Parameters

          • value: any
          • index: number
          • array: any[]

          Returns boolean

    Returns void

waitForResources

  • waitForResources(callback: Function): void
  • Parameters

    • callback: Function

    Returns void

Generated using TypeDoc