OutgoingLinkView
Defined in: src/obsidian/internals/InternalPlugins/OutgoingLink/OutgoingLinkView.d.ts:9
Extends
Section titled “Extends”Properties
Section titled “Properties”_children
Section titled “_children”_children:
Component
[]
Defined in: src/obsidian/augmentations/Components/Component.d.ts:13
Child Components attached to current component, will be unloaded on unloading parent component.
Inherited from
Section titled “Inherited from”_events
Section titled “_events”_events:
EventRef
[]
Defined in: src/obsidian/augmentations/Components/Component.d.ts:20
Events that are attached to the current component, will be detached on unloading parent component.
Inherited from
Section titled “Inherited from”_loaded
Section titled “_loaded”_loaded:
boolean
Defined in: src/obsidian/augmentations/Components/Component.d.ts:27
Whether the component and its children are loaded.
Inherited from
Section titled “Inherited from”actionsEl
Section titled “actionsEl”actionsEl:
HTMLElement
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:13
Container of actions for the view.
Inherited from
Section titled “Inherited from”allowNoFile
Section titled “allowNoFile”allowNoFile:
boolean
Defined in: obsidian.d.ts:1742
Inherited from
Section titled “Inherited from”app:
App
Defined in: obsidian.d.ts:4547
Inherited from
Section titled “Inherited from”backButtonEl
Section titled “backButtonEl”backButtonEl:
HTMLButtonElement
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:20
Back button element for changing view history.
Inherited from
Section titled “Inherited from”canDropAnywhere
Section titled “canDropAnywhere”canDropAnywhere:
boolean
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:27
Whether the view may be dropped anywhere in workspace.
Inherited from
Section titled “Inherited from”closeable
Section titled “closeable”closeable:
boolean
Defined in: src/obsidian/augmentations/Views/View.d.ts:22
Whether the leaf may close the view.
Inherited from
Section titled “Inherited from”containerEl
Section titled “containerEl”containerEl:
HTMLElement
Defined in: obsidian.d.ts:4569
Inherited from
Section titled “Inherited from”contentEl
Section titled “contentEl”contentEl:
HTMLElement
Defined in: obsidian.d.ts:2115
Inherited from
Section titled “Inherited from”file:
null
|TFile
Defined in: obsidian.d.ts:1746
Inherited from
Section titled “Inherited from”forwardButtonEl
Section titled “forwardButtonEl”forwardButtonEl:
HTMLButtonElement
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:41
Forward button element for changing view history.
Inherited from
Section titled “Inherited from”headerEl
Section titled “headerEl”headerEl:
HTMLElement
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:48
Header bar container of view.
Inherited from
Section titled “Inherited from”icon:
string
Defined in: obsidian.d.ts:4551
Inherited from
Section titled “Inherited from”iconEl
Section titled “iconEl”iconEl:
HTMLElement
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:55
Icon element for the view (for dragging).
Inherited from
Section titled “Inherited from”leaf:
WorkspaceLeaf
Defined in: obsidian.d.ts:4565
Inherited from
Section titled “Inherited from”moreOptionsButtonEl
Section titled “moreOptionsButtonEl”moreOptionsButtonEl:
HTMLAnchorElement
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:62
Anchor button for revealing more view actions.
Inherited from
Section titled “Inherited from”InfoFileView
.moreOptionsButtonEl
navigation
Section titled “navigation”navigation:
boolean
Defined in: obsidian.d.ts:1752
Whether or not the view is intended for navigation. If your view is a static view that is not intended to be navigated away, set this to false. (For example: File explorer, calendar, etc.) If your view opens a file or can be otherwise navigated, set this to true. (For example: Markdown editor view, Kanban view, PDF view, etc.)
Inherited from
Section titled “Inherited from”scope:
null
|Scope
Defined in: obsidian.d.ts:4581
Assign an optional scope to your view to register hotkeys for when the view is in focus.
Example
Section titled “Example”this.scope = new Scope(this.app.scope);
Default
Section titled “Default”null@public
Inherited from
Section titled “Inherited from”titleContainerEl
Section titled “titleContainerEl”titleContainerEl:
HTMLElement
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:69
Container for the title of the view.
Inherited from
Section titled “Inherited from”titleEl
Section titled “titleEl”titleEl:
HTMLElement
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:76
Title element for the view.
Inherited from
Section titled “Inherited from”titleParentEl
Section titled “titleParentEl”titleParentEl:
HTMLElement
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:84
Title of the parent.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”addAction()
Section titled “addAction()”Call Signature
Section titled “Call Signature”addAction(
icon
,title
,callback
):HTMLElement
Defined in: obsidian.d.ts:2125
Parameters
Section titled “Parameters”string
string
callback
Section titled “callback”(evt
) => any
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”addAction(
icon
,title
,callback
):HTMLElement
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:101
Add an action to the item view.
Parameters
Section titled “Parameters”string
The icon of the action.
string
The title of the action.
callback
Section titled “callback”(evt
) => any
The callback to call when the action is clicked.
Returns
Section titled “Returns”The DOM element of the action.
Example
Section titled “Example”const action = itemView.addAction('dice', 'foo', () => { console.log('bar');});
Inherited from
Section titled “Inherited from”addChild()
Section titled “addChild()”Call Signature
Section titled “Call Signature”addChild<
T
>(component
):T
Defined in: obsidian.d.ts:911
Adds a child component, loading it if this component is loaded
Type Parameters
Section titled “Type Parameters”T
extends Component
Parameters
Section titled “Parameters”component
Section titled “component”T
Returns
Section titled “Returns”T
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”addChild<
T
>(component
):T
Defined in: src/obsidian/augmentations/Components/Component.d.ts:41
Adds a child component, loading it if this component is loaded.
Type Parameters
Section titled “Type Parameters”T
extends Component
The type of the component to add.
Parameters
Section titled “Parameters”component
Section titled “component”T
The component to add.
Returns
Section titled “Returns”T
The added component.
Example
Section titled “Example”component.addChild(childComponent);
Inherited from
Section titled “Inherited from”canAcceptExtension()
Section titled “canAcceptExtension()”Call Signature
Section titled “Call Signature”canAcceptExtension(
extension
):boolean
Defined in: obsidian.d.ts:1792
Parameters
Section titled “Parameters”extension
Section titled “extension”string
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”InfoFileView
.canAcceptExtension
Call Signature
Section titled “Call Signature”canAcceptExtension(
extension
):boolean
Defined in: src/obsidian/augmentations/Views/FileView.d.ts:41
Whether the file view can accept an extension.
Parameters
Section titled “Parameters”extension
Section titled “extension”string
The extension to check.
Returns
Section titled “Returns”boolean
Whether the file view can accept the extension.
Example
Section titled “Example”console.log(fileView.canAcceptExtension('md'));
Inherited from
Section titled “Inherited from”InfoFileView
.canAcceptExtension
close()
Section titled “close()”close():
Promise
<void
>
Defined in: src/obsidian/augmentations/Views/View.d.ts:74
Closes the view.
Returns
Section titled “Returns”Promise
<void
>
Inherited from
Section titled “Inherited from”constructor__()
Section titled “constructor__()”constructor__(
leaf
):this
Defined in: src/obsidian/augmentations/Views/FileView.d.ts:50
Create a new file view.
Parameters
Section titled “Parameters”The workspace leaf to create the file view in.
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”getDisplayText()
Section titled “getDisplayText()”Call Signature
Section titled “Call Signature”getDisplayText():
string
Defined in: obsidian.d.ts:1761
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”getDisplayText():
string
Defined in: src/obsidian/augmentations/Views/FileView.d.ts:58
Get the display text for the file view.
Returns
Section titled “Returns”string
The display text for the file view.
Inherited from
Section titled “Inherited from”getDisplayText__()?
Section titled “getDisplayText__()?”
optional
getDisplayText__():string
Defined in: src/obsidian/augmentations/Views/View.d.ts:92
Get the display text of the view.
Returns
Section titled “Returns”string
The display text of the view.
Inherited from
Section titled “Inherited from”getEphemeralState()
Section titled “getEphemeralState()”Call Signature
Section titled “Call Signature”getEphemeralState():
Record
<string
,unknown
>
Defined in: obsidian.d.ts:4610
Returns
Section titled “Returns”Record
<string
, unknown
>
Inherited from
Section titled “Inherited from”InfoFileView
.getEphemeralState
Call Signature
Section titled “Call Signature”getEphemeralState():
Record
<string
,unknown
>
Defined in: src/obsidian/augmentations/Views/View.d.ts:100
Get the ephemeral state of the view.
Returns
Section titled “Returns”Record
<string
, unknown
>
The ephemeral state of the view.
Inherited from
Section titled “Inherited from”InfoFileView
.getEphemeralState
getIcon()
Section titled “getIcon()”Call Signature
Section titled “Call Signature”getIcon():
string
Defined in: obsidian.d.ts:4618
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”getIcon():
string
Defined in: src/obsidian/augmentations/Views/View.d.ts:108
Get the icon of the view.
Returns
Section titled “Returns”string
The icon of the view.
Inherited from
Section titled “Inherited from”getSideTooltipPlacement()
Section titled “getSideTooltipPlacement()”getSideTooltipPlacement():
undefined
|"left"
|"right"
Defined in: src/obsidian/augmentations/Views/View.d.ts:115
Returns the placement of the tooltip.
Returns
Section titled “Returns”undefined
| "left"
| "right"
Inherited from
Section titled “Inherited from”InfoFileView
.getSideTooltipPlacement
getState()
Section titled “getState()”Call Signature
Section titled “Call Signature”getState():
Record
<string
,unknown
>
Defined in: obsidian.d.ts:1769
Returns
Section titled “Returns”Record
<string
, unknown
>
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”getState():
Record
<string
,unknown
>
Defined in: src/obsidian/augmentations/Views/FileView.d.ts:66
Get the state of the file view.
Returns
Section titled “Returns”Record
<string
, unknown
>
The state of the file view.
Inherited from
Section titled “Inherited from”getSyncViewState()
Section titled “getSyncViewState()”getSyncViewState():
unknown
Defined in: src/obsidian/augmentations/Views/FileView.d.ts:73
Get view state for sync plugin.
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”getViewType()
Section titled “getViewType()”getViewType():
"outgoing-link"
Defined in: src/obsidian/internals/InternalPlugins/OutgoingLink/OutgoingLinkView.d.ts:13
Get the current view type.
Returns
Section titled “Returns”"outgoing-link"
Overrides
Section titled “Overrides”getViewType__()?
Section titled “getViewType__()?”
optional
getViewType__():string
Defined in: src/obsidian/augmentations/Views/View.d.ts:132
The type of the view.
Returns
Section titled “Returns”string
The type of the view.
Inherited from
Section titled “Inherited from”handleCopy()
Section titled “handleCopy()”handleCopy(
event
):void
Defined in: src/obsidian/augmentations/Views/View.d.ts:139
Handle copy event on metadata editor and serialize properties.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”handleCut()
Section titled “handleCut()”handleCut(
event
):void
Defined in: src/obsidian/augmentations/Views/View.d.ts:146
Handle cut event on metadata editor and serialize and remove properties.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”handleDrop()
Section titled “handleDrop()”handleDrop(
event
,t
,n
):unknown
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:116
Parameters
Section titled “Parameters”unknown
unknown
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”handlePaste()
Section titled “handlePaste()”handlePaste(
event
):void
Defined in: src/obsidian/augmentations/Views/View.d.ts:153
Handle paste event of properties on metadata editor.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”load()
Section titled “load()”Call Signature
Section titled “Call Signature”load():
void
Defined in: obsidian.d.ts:889
Load this component and its children
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”load():
void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:48
Load this component and its children.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”loadFile()
Section titled “loadFile()”loadFile(
file
):Promise
<unknown
>
Defined in: src/obsidian/augmentations/Views/FileView.d.ts:81
Loads the file with the onLoadFile function.
Parameters
Section titled “Parameters”The File to load.
Returns
Section titled “Returns”Promise
<unknown
>
Inherited from
Section titled “Inherited from”onClose()
Section titled “onClose()”onClose():
Promise
<void
>
Defined in: obsidian.d.ts:4594
Returns
Section titled “Returns”Promise
<void
>
Inherited from
Section titled “Inherited from”onClose__()?
Section titled “onClose__()?”
optional
onClose__():Promise
<void
>
Defined in: src/obsidian/augmentations/Views/View.d.ts:162
Called when the view is closed.
Returns
Section titled “Returns”Promise
<void
>
A promise that resolves when the view is closed.
Inherited from
Section titled “Inherited from”onDelete()
Section titled “onDelete()”onDelete(
file
):Promise
<void
>
Defined in: src/obsidian/augmentations/Views/FileView.d.ts:89
Updates the view if it contains the deleted file.
Parameters
Section titled “Parameters”The file that is deleted.
Returns
Section titled “Returns”Promise
<void
>
Inherited from
Section titled “Inherited from”onFileOpen()
Section titled “onFileOpen()”onFileOpen(
file
):void
Defined in: src/obsidian/internals/Views/InfoFileView.d.ts:18
Called when a file is opened. Loads the file and requests a content update.
Parameters
Section titled “Parameters”The opened file.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onGroupChange()
Section titled “onGroupChange()”onGroupChange():
void
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:122
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onHeaderMenu()
Section titled “onHeaderMenu()”onHeaderMenu(
e
):void
Defined in: src/obsidian/augmentations/Views/View.d.ts:168
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onload()
Section titled “onload()”Call Signature
Section titled “Call Signature”onload():
void
Defined in: obsidian.d.ts:1765
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”onload():
void
Defined in: src/obsidian/augmentations/Views/FileView.d.ts:96
Called when the file view is loaded.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onLoadFile()
Section titled “onLoadFile()”Call Signature
Section titled “Call Signature”onLoadFile(
file
):Promise
<void
>
Defined in: obsidian.d.ts:1779
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise
<void
>
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”onLoadFile(
file
):Promise
<void
>
Defined in: src/obsidian/augmentations/Views/FileView.d.ts:114
Called when the file is loaded.
Parameters
Section titled “Parameters”The file that is being loaded.
Returns
Section titled “Returns”Promise
<void
>
A promise that resolves when the file is loaded.
Example
Section titled “Example”class MyFileView extends FileView { public override async onLoadFile(file: TFile): Promise<void> { await super.onLoadFile(file); console.log(file); }}
Inherited from
Section titled “Inherited from”onMoreOptions()
Section titled “onMoreOptions()”onMoreOptions(
event
):void
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:128
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onMoreOptionsMenu()
Section titled “onMoreOptionsMenu()”onMoreOptionsMenu(
e
):void
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:134
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”InfoFileView
.onMoreOptionsMenu
onOpen()
Section titled “onOpen()”onOpen():
Promise
<void
>
Defined in: obsidian.d.ts:4590
Returns
Section titled “Returns”Promise
<void
>
Inherited from
Section titled “Inherited from”onOpen__()?
Section titled “onOpen__()?”
optional
onOpen__():Promise
<void
>
Defined in: src/obsidian/augmentations/Views/View.d.ts:177
Called when the view is opened.
Returns
Section titled “Returns”Promise
<void
>
A promise that resolves when the view is opened.
Inherited from
Section titled “Inherited from”onPaneMenu()
Section titled “onPaneMenu()”Call Signature
Section titled “Call Signature”onPaneMenu(
menu
,source
):void
Defined in: obsidian.d.ts:4634
Populates the pane menu.
(Replaces the previously removed onHeaderMenu
and onMoreOptionsMenu
)
Parameters
Section titled “Parameters”source
Section titled “source”string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”onPaneMenu(
menu
,source
):void
Defined in: src/obsidian/augmentations/Views/View.d.ts:188
Populates the pane menu.
(Replaces the previously removed onHeaderMenu
and onMoreOptionsMenu
)
Parameters
Section titled “Parameters”The menu to populate.
source
Section titled “source”string
The source of the menu.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”onRename()
Section titled “onRename()”Call Signature
Section titled “Call Signature”onRename(
file
):Promise
<void
>
Defined in: obsidian.d.ts:1787
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise
<void
>
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”onRename(
file
):Promise
<void
>
Defined in: src/obsidian/augmentations/Views/FileView.d.ts:131
Called when the file is renamed.
Parameters
Section titled “Parameters”The file that is being renamed.
Returns
Section titled “Returns”Promise
<void
>
A promise that resolves when the file is renamed.
Example
Section titled “Example”class MyFileView extends FileView { public override async onRename(file: TFile): Promise<void> { await super.onRename(file); console.log(file); }}@official
##### Inherited from
[`InfoFileView`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/).[`onRename`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/#onrename)
***
### onResize()
#### Call Signature
> **onResize**(): `void`
Defined in: [obsidian.d.ts:4623](https://github.com/obsidianmd/obsidian-api/blob/HEAD/obsidian.d.ts#L4623)
Called when the size of this view is changed.
##### Returns
`void`
##### Inherited from
[`InfoFileView`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/).[`onResize`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/#onresize)
#### Call Signature
> **onResize**(): `void`
Defined in: [src/obsidian/augmentations/Views/View.d.ts:195](https://github.com/Fevol/obsidian-typings/blob/3.7.1/src/obsidian/augmentations/Views/View.d.ts#L195)
Called when the size of this view is changed.
##### Returns
`void`
:::official{.official}:::##### Inherited from
[`InfoFileView`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/).[`onResize`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/#onresize)
***
### onTabMenu()
> **onTabMenu**(`menu`): `void`
Defined in: [src/obsidian/augmentations/Views/View.d.ts:203](https://github.com/Fevol/obsidian-typings/blob/3.7.1/src/obsidian/augmentations/Views/View.d.ts#L203)
Adds the menu items to the menu.
#### Parameters
##### menu
[`Menu`](/obsidian-typings/api/obsidian-typings/namespaces/obsidian/classes/menu/)
the menu to fill.
#### Returns
`void`
:::unofficial{.unofficial}:::#### Inherited from
[`InfoFileView`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/).[`onTabMenu`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/#ontabmenu)
***
### onunload()
> **onunload**(): `void`
Defined in: [obsidian.d.ts:906](https://github.com/obsidianmd/obsidian-api/blob/HEAD/obsidian.d.ts#L906)
Override this to unload your component
#### Returns
`void`
#### Inherited from
[`InfoFileView`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/).[`onunload`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/#onunload)
***
### onUnloadFile()
#### Call Signature
> **onUnloadFile**(`file`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
Defined in: [obsidian.d.ts:1783](https://github.com/obsidianmd/obsidian-api/blob/HEAD/obsidian.d.ts#L1783)
##### Parameters
###### file
[`TFile`](/obsidian-typings/api/obsidian-typings/namespaces/obsidian/classes/tfile/)
##### Returns
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
##### Inherited from
[`InfoFileView`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/).[`onUnloadFile`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/#onunloadfile)
#### Call Signature
> **onUnloadFile**(`file`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
Defined in: [src/obsidian/augmentations/Views/FileView.d.ts:148](https://github.com/Fevol/obsidian-typings/blob/3.7.1/src/obsidian/augmentations/Views/FileView.d.ts#L148)
Called when the file is unloaded.
##### Parameters
###### file
[`TFile`](/obsidian-typings/api/obsidian-typings/namespaces/obsidian/classes/tfile/)
The file that is being unloaded.
##### Returns
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
A promise that resolves when the file is unloaded.
##### Example
```tsclass MyFileView extends FileView { public override async onUnloadFile(file: TFile): Promise<void> { await super.onUnloadFile(file); console.log(file); }}@official
##### Inherited from
[`InfoFileView`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/).[`onUnloadFile`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/#onunloadfile)
***
### open()
> **open**(`parentEl`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
Defined in: [src/obsidian/augmentations/Views/View.d.ts:211](https://github.com/Fevol/obsidian-typings/blob/3.7.1/src/obsidian/augmentations/Views/View.d.ts#L211)
Opens the view.
#### Parameters
##### parentEl
[`Node`](https://developer.mozilla.org/docs/Web/API/Node)
The node the view get attached to.
#### Returns
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
:::unofficial{.unofficial}:::#### Inherited from
[`InfoFileView`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/).[`open`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/#open)
***
### register()
#### Call Signature
> **register**(`cb`): `void`
Defined in: [obsidian.d.ts:921](https://github.com/obsidianmd/obsidian-api/blob/HEAD/obsidian.d.ts#L921)
Registers a callback to be called when unloading
##### Parameters
###### cb
() => `any`
##### Returns
`void`
##### Inherited from
[`InfoFileView`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/).[`register`](/obsidian-typings/api/obsidian-typings/namespaces/internals/interfaces/infofileview/#register)
#### Call Signature
> **register**(`cb`): `void`
Defined in: [src/obsidian/augmentations/Components/Component.d.ts:78](https://github.com/Fevol/obsidian-typings/blob/3.7.1/src/obsidian/augmentations/Components/Component.d.ts#L78)
Registers a callback to be called when unloading.
##### Parameters
###### cb
() => `any`
The callback to be called when unloading.
##### Returns
`void`
##### Example
```tscomponent.register(() => { console.log('MyComponent unloaded');});
Inherited from
Section titled “Inherited from”registerDomEvent()
Section titled “registerDomEvent()”Call Signature
Section titled “Call Signature”registerDomEvent<
K
>(el
,type
,callback
,options?
):void
Defined in: obsidian.d.ts:931
Registers an DOM event to be detached when unloading
Type Parameters
Section titled “Type Parameters”K
extends keyof WindowEventMap
Parameters
Section titled “Parameters”K
callback
Section titled “callback”(this
, ev
) => any
options?
Section titled “options?”boolean
| AddEventListenerOptions
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”registerDomEvent<
K
>(el
,type
,callback
,options?
):void
Defined in: obsidian.d.ts:936
Registers an DOM event to be detached when unloading
Type Parameters
Section titled “Type Parameters”K
extends keyof DocumentEventMap
Parameters
Section titled “Parameters”K
callback
Section titled “callback”(this
, ev
) => any
options?
Section titled “options?”boolean
| AddEventListenerOptions
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”registerDomEvent<
K
>(el
,type
,callback
,options?
):void
Defined in: obsidian.d.ts:941
Registers an DOM event to be detached when unloading
Type Parameters
Section titled “Type Parameters”K
extends keyof HTMLElementEventMap
Parameters
Section titled “Parameters”K
callback
Section titled “callback”(this
, ev
) => any
options?
Section titled “options?”boolean
| AddEventListenerOptions
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”registerDomEvent<
K
>(el
,type
,callback
,options?
):void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:96
Registers an DOM event to be detached when unloading.
Type Parameters
Section titled “Type Parameters”K
extends keyof DocumentEventMap
The type of the event to register.
Parameters
Section titled “Parameters”The element to register the event on.
K
The type of the event to register.
callback
Section titled “callback”(this
, ev
) => any
The callback to be called when the event is triggered.
options?
Section titled “options?”The options for the event.
boolean
| AddEventListenerOptions
Returns
Section titled “Returns”void
Example
Section titled “Example”component.registerDomEvent(document, 'click', () => { console.log('Document clicked');});
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”registerDomEvent<
K
>(el
,type
,callback
,options?
):void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:119
Registers an DOM event to be detached when unloading.
Type Parameters
Section titled “Type Parameters”K
extends keyof HTMLElementEventMap
The type of the event to register.
Parameters
Section titled “Parameters”The element to register the event on.
K
The type of the event to register.
callback
Section titled “callback”(this
, ev
) => any
The callback to be called when the event is triggered.
options?
Section titled “options?”The options for the event.
boolean
| AddEventListenerOptions
Returns
Section titled “Returns”void
Example
Section titled “Example”component.registerDomEvent(document.body, 'click', () => { console.log('Body clicked');});
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”registerDomEvent<
K
>(el
,type
,callback
,options?
):void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:142
Registers an DOM event to be detached when unloading.
Type Parameters
Section titled “Type Parameters”K
extends keyof WindowEventMap
The type of the event to register.
Parameters
Section titled “Parameters”The element to register the event on.
K
The type of the event to register.
callback
Section titled “callback”(this
, ev
) => any
The callback to be called when the event is triggered.
options?
Section titled “options?”The options for the event.
boolean
| AddEventListenerOptions
Returns
Section titled “Returns”void
Example
Section titled “Example”component.registerDomEvent(window, 'click', () => { console.log('Window clicked');});
Inherited from
Section titled “Inherited from”registerEvent()
Section titled “registerEvent()”Call Signature
Section titled “Call Signature”registerEvent(
eventRef
):void
Defined in: obsidian.d.ts:926
Registers an event to be detached when unloading
Parameters
Section titled “Parameters”eventRef
Section titled “eventRef”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”registerEvent(
eventRef
):void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:159
Registers an event to be detached when unloading.
Parameters
Section titled “Parameters”eventRef
Section titled “eventRef”The event to be registered.
Returns
Section titled “Returns”void
Example
Section titled “Example”component.registerEvent(eventRef);
Inherited from
Section titled “Inherited from”registerInterval()
Section titled “registerInterval()”Call Signature
Section titled “Call Signature”registerInterval(
id
):number
Defined in: obsidian.d.ts:948
Registers an interval (from setInterval) to be cancelled when unloading Use setInterval instead of setInterval to avoid TypeScript confusing between NodeJS vs Browser API
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”registerInterval(
id
):number
Defined in: src/obsidian/augmentations/Components/Component.d.ts:175
Registers an interval (from setInterval) to be cancelled when unloading. Use setInterval instead of setInterval to avoid TypeScript confusing between NodeJS vs Browser API
Parameters
Section titled “Parameters”number
The id of the interval to register.
Returns
Section titled “Returns”number
The id of the interval.
Example
Section titled “Example”component.registerInterval(window.setInterval(() => { console.log('Interval');}, 1000));
Inherited from
Section titled “Inherited from”registerScopeEvent()
Section titled “registerScopeEvent()”registerScopeEvent(
keymapEventHandler
):void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:181
Parameters
Section titled “Parameters”keymapEventHandler
Section titled “keymapEventHandler”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”InfoFileView
.registerScopeEvent
removeChild()
Section titled “removeChild()”Call Signature
Section titled “Call Signature”removeChild<
T
>(component
):T
Defined in: obsidian.d.ts:916
Removes a child component, unloading it
Type Parameters
Section titled “Type Parameters”T
extends Component
Parameters
Section titled “Parameters”component
Section titled “component”T
Returns
Section titled “Returns”T
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”removeChild<
T
>(component
):T
Defined in: src/obsidian/augmentations/Components/Component.d.ts:195
Removes a child component, unloading it.
Type Parameters
Section titled “Type Parameters”T
extends Component
The type of the component to remove.
Parameters
Section titled “Parameters”component
Section titled “component”T
The component to remove.
Returns
Section titled “Returns”T
The removed component.
Example
Section titled “Example”component.removeChild(childComponent);
Inherited from
Section titled “Inherited from”renderBreadcrumbs()
Section titled “renderBreadcrumbs()”renderBreadcrumbs():
void
Defined in: src/obsidian/augmentations/Views/FileView.d.ts:154
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”InfoFileView
.renderBreadcrumbs
setEphemeralState()
Section titled “setEphemeralState()”Call Signature
Section titled “Call Signature”setEphemeralState(
state
):void
Defined in: obsidian.d.ts:4614
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”InfoFileView
.setEphemeralState
Call Signature
Section titled “Call Signature”setEphemeralState(
state
):void
Defined in: src/obsidian/augmentations/Views/View.d.ts:223
Set the ephemeral state of the view.
Parameters
Section titled “Parameters”unknown
The ephemeral state of the view.
Returns
Section titled “Returns”void
Example
Section titled “Example”this.setEphemeralState({ foo: 'bar' });
Inherited from
Section titled “Inherited from”InfoFileView
.setEphemeralState
setState()
Section titled “setState()”Call Signature
Section titled “Call Signature”setState(
state
,result
):Promise
<void
>
Defined in: obsidian.d.ts:1774
Parameters
Section titled “Parameters”any
result
Section titled “result”Returns
Section titled “Returns”Promise
<void
>
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”setState(
state
,result
):Promise
<void
>
Defined in: src/obsidian/augmentations/Views/FileView.d.ts:168
Set the state of the file view.
Parameters
Section titled “Parameters”any
The state to set.
result
Section titled “result”The result of the state.
Returns
Section titled “Returns”Promise
<void
>
A promise that resolves when the state is set.
Example
Section titled “Example”await fileView.setState({ foo: 'bar' }, { history: true });
Inherited from
Section titled “Inherited from”syncState()
Section titled “syncState()”syncState(
e
):Promise
<unknown
>
Defined in: src/obsidian/augmentations/Views/FileView.d.ts:174
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”Promise
<unknown
>
Inherited from
Section titled “Inherited from”unload()
Section titled “unload()”Call Signature
Section titled “Call Signature”unload():
void
Defined in: obsidian.d.ts:900
Unload this component and its children
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Call Signature
Section titled “Call Signature”unload():
void
Defined in: src/obsidian/augmentations/Components/Component.d.ts:211
Override this to unload your component.
Returns
Section titled “Returns”void
Example
Section titled “Example”class MyComponent extends Component { public override onunload(): void { console.log('MyComponent unloaded'); }}
Inherited from
Section titled “Inherited from”update()
Section titled “update()”update():
void
Defined in: src/obsidian/internals/InternalPlugins/OutgoingLink/OutgoingLinkView.d.ts:16
Returns
Section titled “Returns”void
updateNavButtons()
Section titled “updateNavButtons()”updateNavButtons():
void
Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:140
Returns
Section titled “Returns”void