TomVista
V2EX  ›  问与答

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

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

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

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

    有什么解决方法么?

    直接用监听事件?

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

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