2019-02-23 18:08:25 +00:00
|
|
|
/**
|
|
|
|
* Typescript typing rules for Utils
|
|
|
|
*
|
|
|
|
* @author Pierre HUBERT
|
|
|
|
*/
|
|
|
|
|
|
|
|
declare interface CreateElem2Args {
|
|
|
|
type : string,
|
|
|
|
appendTo ?: HTMLElement,
|
|
|
|
insertBefore ?: HTMLElement,
|
|
|
|
insertAsFirstChild ?: HTMLElement,
|
|
|
|
class ?: string,
|
|
|
|
id ?: string,
|
|
|
|
title ?: string,
|
|
|
|
src ?: string,
|
|
|
|
href ?: string,
|
2019-05-16 13:48:50 +00:00
|
|
|
internalHref ?: string,
|
2019-02-23 18:08:25 +00:00
|
|
|
name ?: string,
|
|
|
|
elemType ?: string,
|
|
|
|
value ?: string,
|
|
|
|
placeholder ?: string,
|
|
|
|
innerHTML ?: string,
|
|
|
|
innerLang ?: string,
|
|
|
|
innerHTMLprefix ?: string,
|
|
|
|
disabled ?: boolean,
|
2019-05-16 13:48:50 +00:00
|
|
|
children ?: HTMLElement[],
|
|
|
|
onclick ?: Function
|
2019-02-23 18:08:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
declare function createElem(nodeType : string, appendTo : string) : HTMLElement;
|
|
|
|
|
|
|
|
declare function createElem2(infos : CreateElem2Args) : HTMLElement;
|
|
|
|
|
|
|
|
declare function byId(id : string) : HTMLElement;
|
|
|
|
|
|
|
|
declare function emptyElem(target : HTMLElement) : void;
|
|
|
|
|
|
|
|
declare function checkMail(emailAddress : string) : boolean;
|