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"].
If the link has
_blank
target.