Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function isCustomWidget( widget, viewElement ) {
// const symbol = symbols[widget]
if (typeof viewElement !== 'undefined' && viewElement !== null) {
// return !!viewElement.getCustomProperty( symbol ) && isWidget( viewElement );
return !!viewElement.getCustomProperty( formSymbol ) && isWidget( viewElement );
} else {
return false
}
}
it( 'should be widgetized', () => {
expect( isWidget( element ) ).to.be.true;
} );
export function isAcasiWidget( viewElement ) {
let acasiTest = viewElement.getCustomProperty( acasiSymbol )
return !!acasiTest && isWidget( viewElement );
}
export function isTableWidget( viewElement ) {
return !!viewElement.getCustomProperty( 'table' ) && isWidget( viewElement );
}
export function isMediaWidget( viewElement ) {
return !!viewElement.getCustomProperty( 'media' ) && isWidget( viewElement );
}
export function isImageWidget( viewElement ) {
return !!viewElement.getCustomProperty( 'image' ) && isWidget( viewElement );
}