export class DomPurifyHelper { param attr param data public static allowCustomAttributesHook ( attr , data ) { if ( data && data . attrName ) { if ( data . attrName . indexOf ( "on" ) == 0 ) return ; data . allowedAttributes [ data . attrName ] = true ; data . forceKeepAttr = true ; } } param node param data public static allowCustomComponentsHook ( node , data ) { if ( node . nodeName && node . nodeName . match ( /^\w+(-\w+)+$/ ) && ! data . allowedTags [ data . tagName ] ) { data . allowedTags [ data . tagName ] = true ; } } }