为了账号安全,请及时绑定邮箱和手机立即绑定

求大神讲解一下下面代码什么意思

求大神讲解一下下面代码什么意思

momoyy123 2016-04-24 17:26:18
(function(global, factory) {    if (typeof define === 'function' && define.amd) {        define(function() {            return factory(global, global.document);        });    } else if (typeof module !== 'undefined' && module.exports) {        module.exports = factory(global, global.document);    } else {        global.Shake = factory(global, global.document);    }} (typeof window !== 'undefined' ? window : this, function (window, document) {})
查看完整描述

1 回答

?
花满楼的小前端a

TA贡献79条经验 获得超33个赞

使你的代码同时兼容AMD/CMD规范,模块化开发时很有用

查看完整回答
反对 回复 2016-05-11
  • 1 回答
  • 0 关注
  • 1459 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信