Skip to content

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

Description

@Amamatthew

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模块

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions