Thứ Năm, 12 tháng 12, 2013

What is a fail safe scenario?

A fail-safe or fail-secure is one that, in the event of failure, responds in a way that will cause no harm, or at least a minimum of harm, to software apps, nor disrupt end users.

For example:attachEvent is deprecated, you can first check the addEventListener function availability on the browser and then use attachEvent as a fail safe scenario. (

if(window.addEventListener){    window.addEventListener("click", functionA, false)}else if (window.attachEvent) { {    window.attachEvent("onclick", functionA)}