#109 ✓resolved

document.cookie does not exist

Reported by nickg | March 15th, 2010 @ 10:26 AM

Tried reopening ticket #8. Oddly if you comment on a resolved ticket, it does not reopen it.

$ ./tester.sh Rhino 1.7 release 2 2009 03 22
js> load("client9-env-js/dist/env.rhino.js");
[ Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.6.2; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/ ] js> document.cookie
js: "client9-env-js/dist/env.rhino.js", line 5736: uncaught JavaScript runtime exception: ReferenceError: "Cookies" is not defined.

at client9-env-js/dist/env.rhino.js:5736
at <stdin>:3


Comments and changes to this ticket

  • nickg

    nickg March 15th, 2010 @ 01:31 PM

    FYI -- just adding html/cookie.js to build script isn't quite enough.

    js> document.cookie
    js: "client9-env-js/dist/env.rhino.js", line 6604: uncaught JavaScript runtime exception: ReferenceError: "domain" is not defined.
        at client9-env-js/dist/env.rhino.js:6604 (__cookieString__)
        at client9-env-js/dist/env.rhino.js:6598
        at <stdin>:3
  • FroMage

    FroMage March 15th, 2010 @ 01:44 PM

    • Assigned user set to “Thatcher”


    This commit fixes the cookie.js inclusion in the build, but perhaps not your bug: http://github.com/FroMage/env-js/commit/37e6bb9af89f22a8e5bf6f8e051...

    It does let me use cookies though, so not sure what your bug is.

  • nickg

    nickg March 15th, 2010 @ 02:04 PM

    Hi, thanks FroMage...

    Found the other problem... a missing comma. Gotta love javascript.

    function __cookieString__(cookies, doc) {
        var cookieString = ""   // <-------------- OOPS
  • nickg

    nickg March 15th, 2010 @ 04:50 PM

    contains the FroMage build fix, and syntax fix for cookie string


    commit  29e2d471552df12d99cd5adff544518dbd3c7390
    tree    7c2190cb1964146dd0c61e3a2d8ba8224a1b7dce
    parent  9d5bdb6accb90a9668ec639fe5b4a26f641c2778
  • Thatcher

    Thatcher March 16th, 2010 @ 04:36 PM

    Nice work, I will pull this in asap. I was just about to try to use cookies
    with a hudson project to store some state across tests. this will
    definitely get me there fast.

    Since you guys are tackling real issues (thank you very much) I thought you
    might enjoy some open architecture questions. Right now, I belive cookies
    are written to file, but suppose I want an Envjs hook point so I can reuse
    the basic cookie pattern but switch out the save/load point so I can use it
    for minimal session storage on google apps engine (for example).

    Any suggestions for a simple Envjs hook here?

  • nickg

    nickg March 16th, 2010 @ 05:11 PM

    hmmm, good question indeed. I havent tackled the cookie reuse idea - I'm still blocking and tackling some basics. Should the new API idea be it's own ticket? Or go on wiki page for ideas?

    what's a 'hudson project'?


  • Thatcher

    Thatcher March 16th, 2010 @ 05:38 PM

    I'm wasnt terribly happy with the github wiki but maybe I'm over it. I
    would like to use it for something. Can anyone (with an account) edit the
    wiki at thatcher/env-js? If not we need another venue because I want
    everyone with a vested interested to be able to edit it. Im actually
    thinking this project should be moved at some point soon to github/envjs but
    the same question applies.

    This ticket can be closed for sure and we can work this out either by email
    or on the wiki.

  • nickg

    nickg March 21st, 2010 @ 11:02 AM

    • State changed from “new” to “resolved”

    closing since original issue was solved. Thatcher may with to open a new ticket on the other issue with cookies.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

a javascript browser environment

People watching this ticket