use JS in canExcludeScriptlet