This code is supported on IE 9 and up.