RFR: JDK-8314477: Improve definition of "prototypical type"

Pavel Rappo prappo at openjdk.org
Thu Aug 17 09:02:28 UTC 2023

On Thu, 17 Aug 2023 01:02:13 GMT, Joe Darcy <darcy at openjdk.org> wrote:

> Use an index tag to make the definition of "prototypical type" more findable.

Looks good; thanks for doing this.

I rarely, if ever, see the `<dfn>` element, so I had to read up on it.

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dfn#specifying_the_term_being_defined) lead me to think that the text being defined is only that of `<dfn>` or the immediately descending `<abbr>`. But, then I went to [WHATWG](https://html.spec.whatwg.org/multipage/text-level-semantics.html#defining-term) which reassured me that the "descendant text content" is also ok.

The reason why it's important is that on the HTML page, this:

    <dfn>{@index "prototypical type"}</dfn>

translates to this:

    <dfn><span id="prototypicaltype" class="search-tag-result">prototypical type</span></dfn>

Which means that the actual text, prototypical type, is neither within `<dfn>` nor within `<dfn><abbr>`.


Marked as reviewed by prappo (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15320#pullrequestreview-1582124501

More information about the compiler-dev mailing list