the chrome-packaged extension does not pop up the confirm dialog box properly, but debugging can pop up normally before it is packaged, so why, what do you want to do if you want to pop up normally?
if (confirm("\r\n")) {
Tasks.Del(task);//
Tasks.RemoveHtml(task);
}