1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 06:07:59 +01:00

Use @returns rather than @return in API docs.

This commit is contained in:
Doug Kearns
2009-05-16 02:20:12 +10:00
parent cb0a352454
commit bd1798726f
3 changed files with 26 additions and 32 deletions

View File

@@ -140,7 +140,7 @@ function Hints() //{{{
* @param {string} tagname Its tagname.
* @param {doc} The document it is in.
*
* @return [text, showtext]
* @returns [text, showtext]
*/
function getInputHint(elem, tagname, doc)
{
@@ -204,8 +204,7 @@ function Hints() //{{{
* @param {object} elem The <area> element.
* @param {Number} leftpos The left offset of the image.
* @param {Number} toppos The top offset of the image.
*
* @return [leftpos, toppos] The updated offsets.
* @returns [leftpos, toppos] The updated offsets.
*/
function getAreaOffset(elem, leftpos, toppos)
{
@@ -589,8 +588,7 @@ function Hints() //{{{
* Get the hintMatcher according to user preference.
*
* @param {string} hintString The currently typed hint.
*
* @return {hintMatcher}
* @returns {hintMatcher}
*/
function hintMatcher(hintString) //{{{
{
@@ -599,8 +597,7 @@ function Hints() //{{{
*
* @param {RegExp|String} pat The pattern to split on
* @param {String} string The string to split
*
* @return {Array(string)} The lowercased splits of the stting.
* @returns {Array(string)} The lowercased splits of the stting.
*/
function tokenize(pat, string) string.split(pat).map(String.toLowerCase);
@@ -612,9 +609,8 @@ function Hints() //{{{
* order, in the link.
*
* @param {String} hintString The string typed by the user.
*
* @return {function(String):bool} A function that takes the text of a
* hint and returns true if all the (space-delimited) sets of
* @returns {function(String):boolean} A function that takes the text
* of a hint and returns true if all the (space-delimited) sets of
* characters typed by the user can be found in it.
*/
function containsMatcher(hintString) //{{{
@@ -637,8 +633,7 @@ function Hints() //{{{
* @param {String} hintString The string typed by the user.
* @param {boolean} allowWordOverleaping Whether to allow non-contiguous
* words to match.
*
* @return {function(String):boolean} A function that will filter only
* @returns {function(String):boolean} A function that will filter only
* hints that match as above.
*/
function wordStartsWithMatcher(hintString, allowWordOverleaping) //{{{
@@ -658,8 +653,7 @@ function Hints() //{{{
* @param {Array(String)} words The words to match them against
* @param {boolean} allowWordOverleaping Whether words may be
* skipped during matching.
*
* @return {boolean} Whether a match can be found.
* @returns {boolean} Whether a match can be found.
*/
function charsAtBeginningOfWords(chars, words, allowWordOverleaping)
{
@@ -718,8 +712,7 @@ function Hints() //{{{
* @param {Array(String)} words The words to search in.
* @param {boolean} allowWordOverleaping Whether matches may be
* non-contiguous.
*
* @return boolean Whether all the strings matched.
* @returns boolean Whether all the strings matched.
*/
function stringsAtBeginningOfWords(strings, words, allowWordOverleaping)
{
@@ -779,7 +772,8 @@ function Hints() //{{{
"//input[not(@type='hidden')] | //a | //area | //iframe | //textarea | //button | //select | " +
"//xhtml:input[not(@type='hidden')] | //xhtml:a | //xhtml:area | //xhtml:iframe | //xhtml:textarea | //xhtml:button | //xhtml:select";
function checkXPath(val) {
function checkXPath(val)
{
try
{
buffer.evaluateXPath(val, document.implementation.createDocument("", "", null));
@@ -899,12 +893,12 @@ function Hints() //{{{
/**
* Creates a new hint mode.
*
* @param {String} mode The letter that identifies this mode.
* @param {String} description The description to display to the user
* @param {string} mode The letter that identifies this mode.
* @param {string} description The description to display to the user
* about this mode.
* @param {function(Node)} callback The function to be called with the
* element that matches.
* @param {function():String} selector The function that returns an
* @param {function():string} selector The function that returns an
* XPath selector to decide which elements can be hinted (the
* default returns options.hinttags).
*/
@@ -970,7 +964,7 @@ function Hints() //{{{
},
/**
* Handle an event.
* Handle a hint mode event.
*
* @param {Event} event The event to handle.
*/

View File

@@ -1120,7 +1120,7 @@ lookup:
*
* @param {function} fn The function to execute.
* @param {Object} self The 'this' object used when executing fn.
* @return {boolean} false if temp files couldn't be created,
* @returns {boolean} false if temp files couldn't be created,
* otherwise, the return value of <b>fn</b>.
*/
withTempFiles: function (fn, self)

View File

@@ -620,7 +620,7 @@ function CommandLine() //{{{
/**
* Determines whether the command line should be visible.
*
* @return {boolean}
* @returns {boolean}
*/
function commandShown() modes.main == modes.COMMAND_LINE &&
!(modes.extended & (modes.INPUT_MULTILINE | modes.OUTPUT_MULTILINE));