extends js functionality