[removed] Overriding alert()

后端 未结 12 2428
忘了有多久
忘了有多久 2020-11-22 03:17

Has anyone got any experience with overriding the alert() function in JavaScript?

  • Which browsers support this?
  • Which browser-versions sup
12条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 04:01

    All JavaScript implementations in modern browsers support overriding.

    The dangers are quite simply, that you would drive other team members absolutely crazy by overriding commonly known functions such as alert().

    So unless you are overriding functions as a tool to perhaps debug or hack existing code in some way, I don't see any reason to do it. Just create a new function.

提交回复
热议问题