handle push & pull for Javascript platform