Nav(optsopt)

Navigation builder.

Constructor

Parameters:
Name Type Description
optsopt object
Properties
Name Type Description
data Doclet[]
heading string
wrap string[]
  • 0: Opening tag
  • 1: Ending tag
class string
wbr boolean
refs Ref[]
getLink function

Callback to get link for each menu item.

  • Params: doclet
  • Return: { url, label, text }
getItems function

Callback to retrieve menu items.

  • Params: data
  • Return: <object[]>
filter function

Filter to apply to HTML result.

  • Params: html, nav, data
  • Return: Modified HTML
children
Author:
Satoshi Soma (amekusa.com)
License:
Apache-2.0
Copyright 2020 Satoshi Soma

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Source:
lib/Nav.js, line 22

Methods

addChild(nav)

Adds the given Nav as a child.

Parameters:
Name Type Description
nav
Source:
lib/Nav.js, line 91

build(dataopt)string

Builds all the refs and HTML.

Parameters:
Name Type Default Description
dataopt object[] null
Source:
lib/Nav.js, line 102
Returns:

HTML

Type:
string

getRef(doclet)Ref

Returns a ref with the given doclet if it exists.

Parameters:
Name Type Description
doclet Doclet
Source:
lib/Nav.js, line 80
Returns:

Ref

Type:
Ref

newRef(doclet, linkopt)Ref

Registers new ref with the given doclet.

Parameters:
Name Type Default Description
doclet Doclet
linkopt object null
Properties
Name Type Description
url string
label string
Source:
lib/Nav.js, line 68
Returns:

New ref

Type:
Ref

Licensed under the Apache License 2.0

Documentation generated by JSDoc 4.0.2 using Docolatte theme