“Let’s say I’ve taken a native function prototype—like Array.prototype.slice
or
Array.prototype.indexOf
and assigned it a new value. How would you get the original value back?”
Explanation : I am building third party JS
widget which embeds small HTML
to consumers website. We have decided not to use IFRAME
so JS
library directly integrated into consumers page. Widgets working fine in test environment but its breaks on some real production website. During the investigation I found, some of the native function not working as expected on those websites which I am using.
- How to investigate that does something wrong with native functions so that I can restore some functions as explained here
- Any better approach for third party widget development to avoid such issue