#3 js polyfill