Options
All
  • Public
  • Public/Protected
  • All
Menu

External module core/modules/prevent

barba/core/modules/prevent



Prevent checks.

  • Gathers all the tests that allow Barba to work and play transitions

Index

Functions

Const blank

  • blank(__namedParameters: object): boolean
  • If the link has _blank target.

    Parameters

    • __namedParameters: object
      • el: HTMLAnchorElement | SVGAElement

    Returns boolean

Const corsDomain

  • corsDomain(__namedParameters: object): boolean
  • If the domain is the same (in order to avoid pushState cross origin security problem). Note: SVGAElement do not have protocol neither hostname properties.

    Parameters

    • __namedParameters: object
      • el: HTMLAnchorElement | SVGAElement

    Returns boolean

Const corsPort

  • corsPort(__namedParameters: object): boolean
  • If the port is the same. Note: SVGAElement do not have port property.

    Parameters

    • __namedParameters: object
      • el: HTMLAnchorElement | SVGAElement

    Returns boolean

Const download

  • download(__namedParameters: object): boolean
  • If the link has download attribute.

    Parameters

    • __namedParameters: object
      • el: HTMLAnchorElement | SVGAElement

    Returns boolean

Const exists

  • exists(__namedParameters: object): boolean
  • Make sure there is an el and href.

    Parameters

    • __namedParameters: object
      • el: HTMLAnchorElement | SVGAElement
      • href: string

    Returns boolean

Const newTab

  • newTab(__namedParameters: object): boolean
  • If the user is pressing ctrl + click, the browser will open a new tab.

    Parameters

    • __namedParameters: object
      • event: Event

    Returns boolean

Const preventAll

  • preventAll(__namedParameters: object): boolean
  • If some link ancestor contains [data-barba-prevent="all"].

    Parameters

    • __namedParameters: object
      • el: HTMLAnchorElement | SVGAElement

    Returns boolean

Const preventSelf

  • preventSelf(__namedParameters: object): boolean
  • If the links contains [data-barba-prevent] or [data-barba-prevent="self"].

    Parameters

    • __namedParameters: object
      • el: HTMLAnchorElement | SVGAElement

    Returns boolean

Const pushState

  • pushState(): boolean

Const sameUrl

  • sameUrl(__namedParameters: object): boolean
  • If the link is the current URL.

    Not in the test suite.

    Parameters

    • __namedParameters: object
      • href: string

    Returns boolean

Generated using TypeDoc