add js snippet doc