Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojo/cookie.js

  • Provides:

    • dojo.cookie
  • Requires:

    • dojo.regexp in common
  • dojo.__cookieProps

    • type
      Function
  • dojo.__cookieProps.expires

    • optional
    • type
      Date|String|Number
    • summary
      If a number, the number of days from today at which the cookie
      will expire. If a date, the date past which the cookie will expire.
      If expires is in the past, the cookie will be deleted.
      If expires is omitted or is 0, the cookie will expire when the browser closes. << FIXME: 0 seems to disappear right away? FF3.
  • dojo.__cookieProps.path

    • optional
    • type
      String
    • summary
      The path to use for the cookie.
  • dojo.__cookieProps.domain

    • optional
    • type
      String
    • summary
      The domain to use for the cookie.
  • dojo.__cookieProps.secure

    • optional
    • type
      Boolean
    • summary
      Whether to only send the cookie on secure connections
  • dojo.cookie

    • parameters:
      • name: (typeof String)
        Name of the cookie
      • value: (typeof String)
        Value for the cookie
      • props: (typeof dojo.__cookieProps)
        Properties for the cookie
    • returns
      String or undefined
    • summary
      Get or set a cookie.
    • description
      If one argument is passed, returns the value of the cookie
      For two or more arguments, acts as a setter.
    • example
      set a cookie with the JSON-serialized contents of an object which
      will expire 5 days from now:
      	dojo.cookie("configObj", dojo.toJson(config), { expires: 5 });
    • example
      de-serialize a cookie back into a JavaScript object:
      	var config = dojo.fromJson(dojo.cookie("configObj"));
    • example
      delete a cookie:
      	dojo.cookie("configObj", null, {expires: -1});
    • type
      Function
  • document.cookie

    • alias - updatedCookie
  • dojo.cookie.isSupported

    • summary
      Use to determine if the current browser supports cookies or not.
      
      Returns true if user allows cookies.
      Returns false if user doesn't allow cookies.
    • type
      Function
  • navigator.cookieEnabled

    • type
      bool
  • dojo

    • type
      Object