Interfaces for setting, fetching, persisting, and rendering text track styling
npm install kewt




interfaces for setting, fetching, persisting, and rendering text track styling
The following code loads a DOM ready interface that checks for existing settings on localstorage, sets new values for a variety of options, persists the changes to localstorage, and renders a style tag to the document head.
``js
import { KewtDOM } from 'kewt';
KewtDOM
.set('font', 'sans-serif')
.set('fontSize', '4')
.set('fontEdge', 'shadow')
.set('edgeHighlight', 'yellow')
.set('edgeOpacity', 50)
.set('textColor', 'teal')
.set('textOpacity', 25)
.set('backgroundColor', 'purple')
.set('backgroundOpacity', '100')
.persist()
.render();
`
| Setting | Default | Options |
|---|---|---|
| font | 'monospaced-serif' | 'monospaced-serif', 'sans-serif', 'serif' |fontSize
| | '3' | '1'-'6' |fontEdge
| | none | 'none', 'uniform', 'raised', 'shadow', 'depressed'|edgeHighlight
| | 'black' | 'black', 'blue', 'green', 'teal', 'red', 'purple', 'yellow', 'white' |edgeOpacity
| | '0' | '0'-'100' |textColor
| | 'white' | 'black', 'blue', 'green', 'teal', 'red', 'purple', 'yellow', 'white' |textOpacity
| | '100' | '0'-'100' |backgroundColor
| | 'black' | 'black', 'blue', 'green', 'teal', 'red', 'purple', 'yellow', 'white' |backgroundOpacity
| | '100' | '0'-'100' |
* Kewt
* new Kewt(options, defaults)
* .reset() ⇒ Kewt
* [.get([property])](#Kewt+get) ⇒ string | object
* [.set(property, [value])](#Kewt+set) ⇒ Kewt
* .setProperty(property, value) ⇒ Kewt
| Param | Type | Description |
| --- | --- | --- |
| options | object | overrides for default options |
| defaults | object | overrides for detault defaults |
Kind: instance method of Kewt
Kind: instance method of Kewt
Returns: string | object - the property, if specified, or all the properties
| Param | Type | Description |
| --- | --- | --- |
| [property] | string | the property to get |
Kind: instance method of Kewt
| Param | Type | Description |
| --- | --- | --- |
| property | string | object | the property to set |
| [value] | string | the value for the property if property is a string |
Kind: instance method of Kewt
| Param | Type | Description |
| --- | --- | --- |
| property | string | the property to set |
| value | string | the value for the property |
* KewtDOM
* new KewtDOM(options, defaults)
* .reset() ⇒ undefined
* .render() ⇒ undefined
* .persist() ⇒ undefined
| Param | Type | Description |
| --- | --- | --- |
| options | object | overrides for default options |
| defaults | object | overrides for detault defaults |
Kind: instance method of KewtDOM
Kind: instance method of KewtDOM
Kind: instance method of KewtDOM
`sh`
npm run test
`sh`
npm run coverage
`sh`
npm run lint
`sh`
npm run readme
`sh``
npm run compile
MIT @ Flip