arguiot/DisplayJS

Uncaught TypeError: Cannot redefine property: chrome

JZLeung opened this issue · 1 comments

when i try to use $.var(true) , it crashed.

var $ = new DisplayJS(window)
$.var(true)
Uncaught TypeError: Cannot redefine property: chrome
    at Function.defineProperty (<anonymous>)
    at Object.watch (display.js:759)
    at Object.watchAll (display.js:778)
    at DisplayJS.live (display.js:782)
    at DisplayJS._var (display.js:47)

oops, i didn't see this before, i'm so sorry.

⚠️ Our implementation of Object.prototype.watch() is not perfect, there is still some bugs. By the way, don't use it for the window variable. That's why the push method's live implementation doesn't work with window

but i think it can throw an exception when try to bind on window