exposing seajs.debug #117

Closed
lifesinger opened this Issue Nov 1, 2011 · 0 comments

Projects

None yet

1 participant

@lifesinger
Member

通过 ?seajs-debug 或 bookmarklet 的方式开启 debug 模式后,目前在业务代码里,需要通过 seajs._fn 等方式获知 debug 是否开启。更好的方式是:

在业务代码里,直接可以通过 seajs.debug 来判断当前状态,这样,可以:

var map = [...];

if (seajs.debug) {
  map = [...];
}

这样可以做到自由切换,上线前后无需修改代码。

@lifesinger lifesinger closed this in 92e9f30 Nov 1, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment