Unexpected alert
943 // this.renderLayers.push(newRenderLayer);
944 // }
945 } else {
946 alert("Version '" + version + "' is not supported by 3DuF !"); 947 }
948 // Common Code for rendering stuff
949 // console.log("Feature Layers", Registry.currentDevice.layers);
Description
JavaScript's alert
, confirm
and prompt
functions are widely considered to be obtrusive as UI elements and should be replaced by a more appropriate custom UI implementation.
Furthermore, alert
is often used while debugging code, which should be removed before deployment to production.
Bad Practice
alert("here!");
confirm("Are you sure?");
prompt("What is your name?", "John Doe");
Recommended
customAlert("Something happened!");
customConfirm("Are you sure?");
customPrompt("Who are you?");
function foo() {
const alert = myCustomLib.customAlert;
alert();
}