From: Kevin Sawicki Date: Thu, 29 Sep 2016 00:14:31 +0000 (-0700) Subject: Document cookie changed event X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96e48ac13ca2c7dd30157dca35111ba2e204d57b;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Document cookie changed event --- diff --git a/docs/api/session.md b/docs/api/session.md index 4870400..4883f91 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -395,6 +395,27 @@ session.defaultSession.cookies.set(cookie, (error) => { }) ``` +### Instance Events + +The following events are available on instances of `Cookies`: + +#### Event: 'changed' + +* `event` Event +* `cookie` Object - The cookie that was changed +* `cause` String - The cause of the change with one of the following values: + * `explicit` - The cookie was changed directly by a consumer's action. + * `overwrite` - The cookie was automatically removed due to an insert + operation that overwrote it. + * `expired` - The cookie was automatically removed as it expired. + * `evicted` - The cookie was automatically evicted during garbage collection. + * `expired-overwrite` - The cookie was overwritten with an already-expired + expiration date. +* `removed` Boolean - `true` if the cookie was removed, `false` otherwise. + +Emitted when a cookie is changed because it was added, edited, removed, or +expired. + ### Instance Methods The following methods are available on instances of `Cookies`: