Home Reference Source
public class | source

AbstractInViewBlock

Extends:

AbstractServiceAbstractBlock → AbstractInViewBlock

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

observerOptions: {"root": *, "rootMargin": string, "threshold": *}

Method Summary

Public Methods
public
public

init()

public

offScreen(entry: *)

public
public

onScreen(entry: *)

public

Inherited Summary

From class AbstractService
public
public
public

checkDependencies(dependencies: *[])

public

getService(serviceName: *): *

public

hasService(serviceName: *): *

public

init()

From class AbstractBlock
public

Block id

public

Node name

public

Current page instance

public

rootElement: HTMLElement | null

Container Root container HTMLElement for current block.

public

Node Type block name type

public

Destroy current block.

public abstract

Unbind event block events.

public abstract

init()

Basic members initialization for children classes.

public abstract

Bind load and resize events for this specific block.

public abstract

Called once all page blocks have been created.

public abstract

Called on window resize

Public Constructors

public constructor() source

Abstract block constructor.

It‘s better to extend this class by using init method instead of extending constructor.

Override:

AbstractBlock#constructor

Public Members

public observer: * source

public observerOptions: {"root": *, "rootMargin": string, "threshold": *} source

Public Methods

public destroyEvents() source

Unbind event block events.

Make sure you’ve used binded methods to be able to off them correctly.

Do not forget to call super.destroyEvents(); while extending this method.

Override:

AbstractBlock#destroyEvents

public init() source

Basic members initialization for children classes. Do not search for page blocks here, use onPageReady method instead

Override:

AbstractBlock#init

public offScreen(entry: *) source

Params:

NameTypeAttributeDescription
entry *

public onIntersectionCallback(entries: *) source

Params:

NameTypeAttributeDescription
entries *

public onScreen(entry: *) source

Params:

NameTypeAttributeDescription
entry *

public unobserve() source