New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exposing seajs.debug #117

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

Comments

Projects
None yet
1 participant
@lifesinger
Member

lifesinger commented Nov 1, 2011

通过 ?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