Forum How do I...?

document.cookie fails in Prince

azzlack
When trying to access document.cookie in a javascript file loaded with Prince, it fails with the following message:
TypeError: undefined value is not an object


How can I access cookies in a way that is compatible with Prince?
mikeday
Prince does not support document.cookie yet, perhaps we can add this for 8.1.
azzlack
That would be awesome.

But do you have a timeframe on v8.1?

We are evaluating Prince for a project we are doing, but if it doesn't get document.cookie support before some time, we need to look for other alternatives... :S
mikeday
No timeframe for the next release yet, although it is possible we could implement this feature in the next couple of weeks and provide you with an updated build. What is your use case for document.cookie? Are you writing JavaScript code that depends upon the cookie value to transform the document in some way?
azzlack
Yes. The page has a cookie with the user id which is then used to get data to populate the page.

I've rewrote the scripts today to accept the cookie value as url parameter instead, but then it turned out that nothing will work without support for innerHtml... :)
The page uses jQuery heavily, and without innerHtml the page does not work at all.

So the new roadblock is innerHtml support, rather than document.cookie.


Regards,
Ove Andersen
mikeday
Okay, well that's on the roadmap too. :)