TomVista
V2EX  ›  问与答

严格模式下如何对 window 添加属性或方法

  •  
  •   TomVista · Feb 21, 2019 · 1052 views
    This topic created in 2641 days ago, the information mentioned may be changed or developed.

    今天捡起来 webpack,顺便开始使用严格模式,发现严格模式下无法对 window 添加属性或方法.

    我想在 webpack 中暴露函数,作为 Html 页面上的事件函数.

    有什么解决方法么?

    直接用监听事件?

    还是我这个操作本来就不是这么干的??

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2806 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 11:17 · PVG 19:17 · LAX 04:17 · JFK 07:17
    ♥ Do have faith in what you're doing.