Update docstring

This commit is contained in:
Ismail S 2016-07-08 15:38:58 +01:00
parent babbd0771c
commit 5ad66c29e1

View File

@ -1117,7 +1117,16 @@ class CommandDispatcher:
@cmdutils.register(instance='command-dispatcher', scope='window')
def bookmark_add(self, url=None, title=None):
"""Save the current page as a bookmark, or a specific url."""
"""Save the current page as a bookmark, or a specific url.
If no url and title are provided, then save the current page as a
bookmark.
If a url and title have been provided, then save the given url as
a bookmark with the provided title.
Args:
url: url to save as a bookmark. If None, use url of current page.
title: title of the new bookmark."""
if url and not title:
raise cmdexc.CommandError('Title must be provided if url has '
'been provided')