import AbstractInViewBlock from 'starting-blocks/src/abstracts/AbstractInViewBlock.js'
AbstractInViewBlock
Extends:
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
observer: * |
|
public |
observerOptions: {"root": *, "rootMargin": string, "threshold": *} |
Method Summary
Public Methods | ||
public |
|
|
public |
init() |
|
public |
offScreen(entry: *) |
|
public |
onIntersectionCallback(entries: *) |
|
public |
onScreen(entry: *) |
|
public |
|
Inherited Summary
From class AbstractService | ||
public |
container: * |
|
public |
serviceName: * |
|
public |
checkDependencies(dependencies: *[]) |
|
public |
getService(serviceName: *): * |
|
public |
hasService(serviceName: *): * |
|
public |
init() |
From class AbstractBlock | ||
public |
Block id |
|
public |
Node name |
|
public |
page: AbstractPage | null Current page instance |
|
public |
rootElement: HTMLElement | null Container Root container HTMLElement for current block. |
|
public |
Node Type block name type |
|
public |
destroy() 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 |
onResize() 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#constructorPublic Members
public observer: * 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#destroyEventspublic init() source
Basic members initialization for children classes.
Do not search for page blocks here, use onPageReady
method instead
Override:
AbstractBlock#initpublic offScreen(entry: *) source
Params:
Name | Type | Attribute | Description |
entry | * |
public onIntersectionCallback(entries: *) source
Params:
Name | Type | Attribute | Description |
entries | * |
public onScreen(entry: *) source
Params:
Name | Type | Attribute | Description |
entry | * |