Skip to content
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

when I use define to build a module named cookies, errror message below, Why? #32

Open
Amamatthew opened this issue Mar 8, 2017 · 0 comments

Comments

@Amamatthew
Copy link

Amamatthew commented Mar 8, 2017

cookies.js:21 Uncaught ReferenceError: define is not defined at cookies.js:1

cookies.js
define('cookies',function (){ var docCookies = { getItem: function (sKey) {.... }, setItem: function (sKey, sValue, vEnd, sPath, sDomain, bSecure) {..... }, removeItem: function (sKey, sPath, sDomain) {... }, hasItem: function (sKey) {... }; return {    docCookies: docCookies   }; });
也就是当我通过define函数去定义一个AMD规范的模块的时候,页面信息提示define函数未定义
https://developer.mozilla.org/en-US/docs/DOM/document.cookie 即为我希望按照AMD规范定义的cookies模块

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant