Commit b815f59e authored by DHNishi@gmail.com's avatar DHNishi@gmail.com

Add deprecated annotation for events in API documentation.

Example Image: http://i.imgur.com/u6f6Ewh.png

NOTRY=true
BUG=239196

Review URL: https://codereview.chromium.org/53403004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233032 0039d316-1c4b-4281-b951-d872f2087c98
parent fc7ddae2
......@@ -179,7 +179,7 @@ class _JSCModel(object):
'returns': None,
'id': _CreateId(function, 'method')
}
if (function.deprecated is not None):
if function.deprecated is not None:
function_dict['deprecated'] = self._FormatDescription(
function.deprecated)
if (function.parent is not None and
......@@ -219,6 +219,9 @@ class _JSCModel(object):
'id': _CreateId(event, 'event'),
'byName': {},
}
if event.deprecated is not None:
event_dict['deprecated'] = self._FormatDescription(
event.deprecated)
if (event.parent is not None and
not isinstance(event.parent, model.Namespace)):
event_dict['parentName'] = event.parent.simple_name
......
application: chrome-apps-doc
version: 2-35-1
version: 2-36-0
runtime: python27
api_version: 1
threadsafe: false
......
......@@ -2,4 +2,4 @@ cron:
- description: Repopulates all cached data.
url: /_cron
schedule: every 5 minutes
target: 2-35-1
target: 2-36-0
......@@ -21,7 +21,7 @@
{{?api.events}}
<h2 id="events">Events</h2>
{{#api.events}}
{{+partials.event api:api}}
{{+partials.event @:@ api:api}}
{{/}}
{{/api.events}}
{{?api.domEvents}}
......
<div>
<h4 id="{{id}}">{{name}}</h4>
{{+partials.warning_deprecated item:@}}
<div class="description">
{{?description}}<p>
{{{description}}}
......
{{- Parameters:
|function|: the schema for the function
|item|: the schema for the item
-}}
{{?function.deprecated}}
{{?item.deprecated}}
<p class="warning">
{{function.name}} is deprecated. {{{function.deprecated}}}
{{item.name}} is deprecated. {{{item.deprecated}}}
</p>
{{/function.deprecated}}
\ No newline at end of file
{{/item.deprecated}}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment