From 7b7e9f4640a04f835e60c43a0b058e7a174c2598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20W=C3=A5land?= Date: Sun, 25 Jun 2017 15:29:45 +0200 Subject: [PATCH] add README for badge --- .idea/misc.xml | 6 ++++++ README.md | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 .idea/misc.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/README.md b/README.md index 3ef3e0d..c16bcc8 100644 --- a/README.md +++ b/README.md @@ -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).