We released v308 and started getting these errors, mostly from Internet Explorer 11:
Assignment to read-only properties is not allowed in strict mode
I'm not 100% sure which property is read-only in IE, but I'm guessing it's navigationStart (even though it shouldn't exist on the object). Perhaps the entire object is read-only in IE. I'm not sure.
Regardless, this PR hopefully fixes the issue by creating a new plain object and copying the PerformanceNavigationTiming values into it. It also calls getNavigationEntry() at point-of-use rather than at script evaluation time, just in case calling this too early has some issues on older browsers (?!).
We released v308 and started getting these errors, mostly from Internet Explorer 11:
I'm not 100% sure which property is read-only in IE, but I'm guessing it's
navigationStart
(even though it shouldn't exist on the object). Perhaps the entire object is read-only in IE. I'm not sure.Regardless, this PR hopefully fixes the issue by creating a new plain object and copying the PerformanceNavigationTiming values into it. It also calls
getNavigationEntry()
at point-of-use rather than at script evaluation time, just in case calling this too early has some issues on older browsers (?!).