Re: JavaScript code documentation
- From: Sander Dijkhuis <sander dijkhuis gmail com>
- To: Colin Walters <walters verbum org>
- Cc: gnome-shell-list gnome org
- Subject: Re: JavaScript code documentation
- Date: Sun, 1 Mar 2009 23:04:21 +0100
On Sun, Mar 1, 2009 at 8:28 PM, Colin Walters <walters verbum org> wrote:
> [...] One thing I wonder is how extensible it is. For
> example, there's the generic gjs support for signals; would be quite
> useful to have those listed. And in the shell we have the convention
> of having a .actor property for things which effectively subclass
> Actor. Might be nice to mark those somehow. [...]
It is quite easy to alter the output. For example, adding the code below to
index.html makes all instances of 'actor' in the code link to an explanation.
<script>
App.processors.push(function(documentation) {
$(documentation[0]).parent().children(".code").each(function() {
this.innerHTML = this.innerHTML.replace(/([^\w])(actor)([^\w])/,
"$1<a href='#clutter-basics/actor.html'>$2</a>$3");
});
});
</script>
It's actually not as easy as it could be, but that can be fixed. :-)
Ubiquity's documentation contains some other examples of extensions, like links
to external API docs, defined in index.html.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]