Skip to content

section-index-html.ts#

View Markdown

Source

5 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.

5 symbols 3 functions 1 interfaces 1 modules 5 parameters 3 members 3 returns

Reference#

fnescapeSectionIndexHtml(value: string): stringEscapes text and attribute values in generated listing markup.

Escapes text and attribute values in generated listing markup.

Signature

export function escapeSectionIndexHtml(value: string): string

View source

Parameters

  • value string

Returns

string
fnisSafeSectionHref(value: string): booleanhttps:-free, same-origin or relative href. javascript: is rejected.

https:-free, same-origin or relative href. javascript: is rejected.

Signature

export function isSafeSectionHref(value: string): boolean

View source

Parameters

  • value string

Returns

boolean
fnrenderSectionIndexHtml(title: string, items: readonly SectionIndexItem[], style: SectionIndexStyle): stringRenders the listing body. Titles are escaped; hostile hrefs are dropped.

Renders the listing body. Titles are escaped; hostile hrefs are dropped.

Signature

export function renderSectionIndexHtml(title: string, items: readonly SectionIndexItem[], style: SectionIndexStyle): string

View source

Parameters

Returns

string
modulesection-index-htmlSection-index listing HTML and href safety. Titles are escaped. javascript: / data: / vbscript: / file: hrefs are dropp…

Section-index listing HTML and href safety.

Titles are escaped. javascript: / data: / vbscript: / file: hrefs are dropped. The NAPI helper is preferred when present.

View source

interfaceSectionIndexItemOne child link on a generated section index.

One child link on a generated section index.

Signature

export interface SectionIndexItem

View source

Members

Properties
NameTypeDescription
descriptionoptional string
href string
title string