##// END OF EJS Templates
Added 'Attrs', 'Events' type parameters to DjxWidgetBase, typed 'on' and 'emit' methods
Added 'Attrs', 'Events' type parameters to DjxWidgetBase, typed 'on' and 'emit' methods

File last commit:

r2:8ec37bf1b4d1 default
r30:a46488b209e8 v1.0.0-rc14 default
Show More
dom-class.d.ts
38 lines | 1.3 KiB | video/mp2t | TypeScriptLexer
import { NodeOrString } from "./interfaces";
interface DomClass {
/**
* Returns whether or not the specified classes are a portion of the
* class list currently applied to the node.
*/
contains(node: NodeOrString, classStr: string): boolean;
/**
* Adds the specified classes to the end of the class list on the
* passed node. Will not re-apply duplicate classes.
*/
add(node: NodeOrString, classStr: string | string[]): void;
/**
* Removes the specified classes from node. No `contains()`
* check is required.
*/
remove(node: NodeOrString, classStr?: string | string[]): void;
/**
* Replaces one or more classes on a node if not present.
* Operates more quickly than calling dojo.removeClass and dojo.addClass
*/
replace(node: NodeOrString, addClassStr: string | string[], removeClassStr?: string | string[]): void;
/**
* Adds a class to node if not present, or removes if present.
* Pass a boolean condition if you want to explicitly add or remove.
* Returns the condition that was specified directly or indirectly.
*/
toggle(node: NodeOrString, classStr: string | string[], condition?: boolean): boolean;
}
declare const domClass: DomClass;
export = domClass;