Class: KMDocInst

KMDocInst

new KMDocInst()

Source:

Methods

addHead(html)

Add html code into head of document
Parameters:
Name Type Description
html string
Source:

addScript(filename)

Add script file into document
Parameters:
Name Type Description
filename string
Source:

addStyle(filename)

Add stylesheet file into document
Parameters:
Name Type Description
filename string
Source:

build()

Run building process
Source:

load()

Load file into memory
Source:

parse(str)

Parse and extract definitions from input string
Parameters:
Name Type Description
str string
Source:

postprocess(fn)

Register postprocessing function
Parameters:
Name Type Description
fn function
Source:

preprocess(fn)

Register preprocessing function
Parameters:
Name Type Description
fn function
Source:

save()

Save file
Source:

transformDef(def)

Transform definition object This function is applied to every definition after parsing. By default it applies attribute helpers and generates unique id.
Parameters:
Name Type Description
def object definition
Source:

use()

Use specified modules Parameters can be either functions or strings
Source: