update js for webshims compatibility