| FoxitPDFSDKforWeb v11.0.5 Archives Foxit PDF SDK for Web

Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
UIXAddon Class Reference
UIExtension

UIXAddon, an addon that relies on the UIExtension of Foxit PDF SDK for Web, is packaged separately into a JS file. The applications can load this addon as needed. This class defines the method templates what a UIXAddon needs to implement. More...

Inheritance diagram for UIXAddon:

## Public Member Functions
| afterMounted (root)
| Lifecycle method: this method is called after the UI component element mout into DOM tree. More...
| beforeMounted (root)
| Lifecycle method: this hook is called before the UI component element mount into DOM tree. More...
| destroy ()
| Lifecycle method: to override this method to implement the destroying logics. This method is called when a PDFUI instance is destroyed or the addon is dettached from PDFUI. More...
| fragments ()
| UI fragment configurations of this addon. More...
| getI18NResources ()
| Get I18n resources. More details about I18Next, please visit: https://www.i18next.com/. More...
static | getName ()
| Returns the name of an addon. More...
| init (pdfui)
| Called when initializing this addon instance. More...
| pdfViewerCreated (pdfviewer)
| Lifecycle method: this method is called when PDFViewer instance has been created and is before the afterMounted method . More...

## Protected Member Functions
| receiveAction (actionName, args=[])
| When the user calls PDFUI.callAddon, the receiveAction method on the corresponding Addon will be triggered. Addon exposes the API through this method and different action values. In the custom Addon subclass, you should implement this method to implement exposed APIs. More...

## Static Protected Member Functions
static | initOnLoad ()
| Called after loading this addon, and only called once, The UI modules, components and controllers should be initialized and registered in this function.

## Detailed Description

UIXAddon, an addon that relies on the UIExtension of Foxit PDF SDK for Web, is packaged separately into a JS file. The applications can load this addon as needed. This class defines the method templates what a UIXAddon needs to implement.

## Member Function Documentation

## ◆ afterMounted()

UIXAddon::afterMounted | ( |  | root | ) |
| inline

Lifecycle method: this method is called after the UI component element mout into DOM tree.

Parameters

  root | Component

## ◆ beforeMounted()

UIXAddon::beforeMounted | ( |  | root | ) |
| inline

Lifecycle method: this hook is called before the UI component element mount into DOM tree.

Parameters

  root | Component

## ◆ destroy()

UIXAddon::destroy | ( |  | ) |
| inline

Lifecycle method: to override this method to implement the destroying logics. This method is called when a PDFUI instance is destroyed or the addon is dettached from PDFUI.

Returns
  Promise<void>|void

## ◆ fragments()

UIXAddon::fragments | ( |  | ) |
| inline

UI fragment configurations of this addon.

Returns
  UIFragmentOptions[]

## ◆ getI18NResources()

UIXAddon::getI18NResources | ( |  | ) |
| inline

Get I18n resources. More details about I18Next, please visit: https://www.i18next.com/.

Returns
  object

format:
  { [language]: { [key]: value } }

## ◆ getName()

static getName | ( |  | ) |
| inline

Returns the name of an addon.

Returns
  string

## ◆ init()

init | ( |  | pdfui | ) |
| inline

Called when initializing this addon instance.

Parameters

  pdfui | PDFUI -

## ◆ pdfViewerCreated()

UIXAddon::pdfViewerCreated | ( |  | pdfviewer | ) |
| inline

Lifecycle method: this method is called when PDFViewer instance has been created and is before the afterMounted method .

Parameters

  pdfviewer | PDFUI

## ◆ receiveAction()

UIXAddon::receiveAction | ( |  | actionName,
|  |  | args = `[]`
| ) |  |
| inline protected

When the user calls PDFUI.callAddon, the receiveAction method on the corresponding Addon will be triggered. Addon exposes the API through this method and different action values. In the custom Addon subclass, you should implement this method to implement exposed APIs.

Parameters

  actionName | string
  args | any[]

@2025 Foxit Software Incorporated. All rights reserved.