Options
All
  • Public
  • Public/Protected
  • All
Menu

extrajs-dom

Index

Type aliases

RenderingFunction

RenderingFunction: function
summary

A rendering function.

description

This function takes a document fragment and data, and may modify the fragment using the data. Additionally it may use any rendering options passed. It should not have a this context, and it should not have a return value.

If this function does have a this context, a this_arg may be passed to {@link xjs_HTMLTemplateElement#render}. Any return value of the function does nothing.

param

the template content with which to render

param

the data to fill the template upon rendering

param

additional rendering options

Type declaration

    • (frag: DocumentFragment, data: any, opts?: object): void
    • Parameters

      • frag: DocumentFragment
      • data: any
      • Optional opts: object

      Returns void

ValueFunction

ValueFunction: function
summary

A type of function passed to {@link xjs_Element#attr} to manipulate this element’s attributes.

description

This function type must take zero arguments and return a single primitive value: a string, number, or boolean. Any this context in the function will almost always point to this xjs.Element object (but can be overridden).

returns

the value used as the attribute value to set

Type declaration

    • (this: any): string | number | boolean
    • Parameters

      • this: any

      Returns string | number | boolean

ValueObject

ValueObject: object
summary

An object passed to {@link xjs_Element#attr} to manipulate many attributes at once.

description

An object with string indices and ValueType values.

Type declaration

ValueType

ValueType: string | number | boolean | null
summary

A type to provide as a value argument for setting/removing an attribute.

description
  • If it is a string, number, or boolean, then the attribute value will be set to that value, stringified (number and boolean converted to a string).
  • If it is null, the attribute is removed.

Variables

Const fs

fs: any = require('fs')

Const jsdom

jsdom: any = require('jsdom')

Const path

path: any = require('path')

Const util

util: any = require('util')

Object literals

Const xjs

xjs: object

Object

Object: any = require('extrajs').Object

Generated using TypeDoc