mirror of
https://ark.sudovanilla.org/Korbs/electron-tabs.git
synced 2024-12-22 19:43:53 +00:00
add README for badge
This commit is contained in:
parent
24ba56dcd3
commit
7b7e9f4640
6
.idea/misc.xml
Normal file
6
.idea/misc.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
</project>
|
|
@ -71,6 +71,7 @@ Add a new tab to the tab group and returns a `Tab` instance.
|
|||
|
||||
* `title`: tab title.
|
||||
* `src`: URL to the page which will be loaded into the view. This is actually the same than `options.webview.src`.
|
||||
* `badge`: optional text to put into a badge, badge will be hidden if it's falsey
|
||||
* `iconURL`: optional URL to the tab icon.
|
||||
* `icon`: optional code for a tab icon. Can be used with symbol libraries (example with Font Awesome: `icon: 'fa fa-icon-name'`). This attribute is ignored if an `iconURL` was given.
|
||||
* `closable` (default: `true`): if set to `true` the close button won't be displayed and the user won't be able to close the tab. See also `tab.close()`.
|
||||
|
@ -99,6 +100,14 @@ Set tab title.
|
|||
|
||||
Get current tab title.
|
||||
|
||||
#### `tab.setBadge(badge)`
|
||||
|
||||
Set tab badge.
|
||||
|
||||
#### `tab.getBadge()`
|
||||
|
||||
Get current tab badge.
|
||||
|
||||
#### `tab.setIcon (iconURL, icon)`
|
||||
|
||||
Set tab icon (a iconURL or an icon must be given).
|
||||
|
|
Loading…
Reference in a new issue