Skip to main content

Class: PageMetaHandler

@ima/core.PageMetaHandler

Hierarchy

Constructors

constructor

new PageMetaHandler(window, metaManager)

Parameters

NameType
windowWindow
metaManagerMetaManager

Overrides

PageHandler.constructor

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:21

Properties

#managed

Private #managed: boolean = false

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:15


#metaManager

Private #metaManager: MetaManager

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:14


#window

Private #window: Window

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:13

Accessors

$dependencies

Static get $dependencies(): (typeof Window | typeof MetaManager)[]

Returns

(typeof Window | typeof MetaManager)[]

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:17

Methods

#sanitizeValue

Private #sanitizeValue(value): null | string

Parameters

NameType
valueMetaValue

Returns

null | string

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:124


#selectMetaTags

Private #selectMetaTags(): NodeList

Returns

NodeList

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:128


#updateMetaAttributes

Private #updateMetaAttributes(): void

Update specified meta or link tags in DOM.

Returns

void

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:59


#updateMetaTag

Private #updateMetaTag<K>(iterator, tagName, keyName): void

Helper to update specific meta tags in page document.

Type parameters

NameType
Kextends MetaManagerRecordKeys

Parameters

NameTypeDescription
iteratornever[] | IterableIterator<[string, MetaManagerRecord<K>]>Collection of meta records to update.
tagName"link" | "meta"Tag name for the given collection.
keyName"name" | "rel" | "property"-

Returns

void

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:93


destroy

destroy(): void

Finalization callback, called when the page manager is being discarded. This usually happens when the page is hot-reloaded at the client side.

Returns

void

Inherited from

PageHandler.destroy

Defined in

packages/core/src/page/handler/PageHandler.ts:50


handlePostManagedState

handlePostManagedState(): void

Called after a PageManager finishes transition from previous page to a new one.

Returns

void

Overrides

PageHandler.handlePostManagedState

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:38


handlePreManagedState

handlePreManagedState(): void

Called before a PageManager starts to transition from previous page to a new one.

Returns

void

Overrides

PageHandler.handlePreManagedState

Defined in

packages/core/src/page/handler/PageMetaHandler.ts:31


init

init(): void

Initializes the page handler.

Returns

void

Inherited from

PageHandler.init

Defined in

packages/core/src/page/handler/PageHandler.ts:7