Tab Update Object
Properties
clearData ([string]
)
An array of keys to remove from tab.data
.
const tab = jancy.tabManager.getTab({ uuid: "75442486-0878-440c-9db1-a7006c25a39f" }) const updates = { data: { first: 1, second: 2 } } jancy.tabManager.updateTab(tab, updates) console.log(tab.data) // { first: 1, second: 2 } const newUpdates = { clearData: ["second"] } jancy.tabManager.updateTab(tab, newUpdates) console.log(tab.data) // { first: 1 }
data (object
)
Sets the tab data.
A value of null
or and empty object {}
clears all the data.
const tab = jancy.tabManager.getTab({ uuid: "75442486-0878-440c-9db1-a7006c25a39f" }) const updates = { data: { first: 1 } } jancy.tabManager.updateTab(tab, updates) console.log(tab.data) // { first: 1 }
emailCode (Resolved Value object
)
Updates the tab’s resolved email code value with a new resolved value object.
Can be null
.
favicon (string
)
Updates the tab’s favicon.
This should be a URL.
notes (string
)
Sets or clears the notes associated with the tab.
Pass null
to clear the notes.
panel (string
)
Set the current tab panel.
Valid values are profile
, notes
, and debug
.
If the panel
is preceeded by a !
then we’re in toggle mode. In toggle mode, if the current panel is the same as the new panel then we just toggle the tab panel off. If they’re not the same we make sure tab panel is enabled.
password (Resolved Value object
)
Updates the tab’s resolved password value with a new resolved value object.
Can be null
.
priority (Integer
)
Set the tab’s priority.
Valid values are 0-9
.
priorityGroup (Integer
)
Set the tab’s priority group.
Valid values are 0-9
.
reloadSeconds (Integer
)
Starts or stops the tab auto-reload feature.
Passing a value of null
turns off tab reloading.
smsCode (Resolved Value object
)
Updates the tab’s resolved sms code value with a new resolved value object.
Can be null
.
subTitle (string
)
Updates the tab’s subtitle.
title (string
)
Updates the tab’s title.
updateData (Object
)
Inserts or updates all properties from updateData
into tab.data
.
const tab = jancy.tabManager.getTab({ uuid: "75442486-0878-440c-9db1-a7006c25a39f" }) const updates = { data: { first: 1 } } jancy.tabManager.updateTab(tab, updates) console.log(tab.data) // { first: 1 } const newUpdates = { data: { second: 2 } } jancy.tabManager.updateTab(tab, newUpdates) console.log(tab.data) // { first: 1, second: 2 }
url (string
)
Updates the tab’s URL.
Updating the URL does not cause the tab to navigate.
zoomDirection (string
)
Increases or decreases the tab’s zoom level by 1 in either direction.
Possible values are in
(increases zoom) or out
(decreases zoom).
zoomLevel (Integer
)
Updates the tab’s zoom level.