This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20703 - Make this xref (the-id-attribute) work.
Summary: Make this xref (the-id-attribute) work.
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-18 03:33 UTC by contributor
Modified: 2013-03-15 23:06 UTC (History)
3 users (show)

See Also:


Attachments
dfn.js tweak (1.22 KB, patch)
2013-01-18 03:36 UTC, Kang-Hao (Kenny) Lu
Details

Description contributor 2013-01-18 03:33:32 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-id-attribute
Multipage: http://www.whatwg.org/C#the-id-attribute
Complete: http://www.whatwg.org/c#the-id-attribute

Comment:
Make this xref (the-id-attribute) work.

Posted from: 221.223.50.90 by kennyluck@csail.mit.edu
User agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)
Comment 1 Kang-Hao (Kenny) Lu 2013-01-18 03:36:45 UTC
Created attachment 1315 [details]
dfn.js tweak

I don't claim that this is fully tested, but it might work.

Is there a public repository for dfn.js and such?
Comment 2 Ian 'Hixie' Hickson 2013-03-13 23:26:40 UTC
By "work", do you just mean "be more aggressive about including an ID in the back-reference panel"? It seems to work for me otherwise...

I've added the back-reference part of your suggested patch. I couldn't work out why the other part would be needed (the ToC doesn't include <dfn>s, does it?).

There's no repo for this, it's just a file on my site currently.
Comment 3 Kang-Hao (Kenny) Lu 2013-03-14 11:58:20 UTC
(In reply to comment #2)
> By "work", do you just mean "be more aggressive about including an ID in the
> back-reference panel"? It seems to work for me otherwise...

What I am saying is that clicking neither "id" or "the id attribute" pop up the xref list.
 
> I've added the back-reference part of your suggested patch. I couldn't work
> out why the other part would be needed (the ToC doesn't include <dfn>s, does
> it?).

The Toc include links to <dfn>-like and so dfnGetCaption(a-link-in-toc) would be null because such links are not in any <section> (and such back-reference has no value anyway). By the way, check the console and it raises

  ReferenceError: parentNode is not defined

if you click on "id" as in "the id attribute".

> There's no repo for this, it's just a file on my site currently.

OK.
Comment 4 Ian 'Hixie' Hickson 2013-03-14 22:51:59 UTC
The links in the ToC are in the "Full table of contents" section, which seems to work fine in the popup.

I fixed my dumb typo that was giving the error, sorry about that. Does it all work as you desire now?
Comment 5 Kang-Hao (Kenny) Lu 2013-03-14 22:56:12 UTC
(In reply to comment #4)
> The links in the ToC are in the "Full table of contents" section, which
> seems to work fine in the popup.
> 
> I fixed my dumb typo that was giving the error, sorry about that. Does it
> all work as you desire now?

No. OK, I see what's going on. It works fine in the Complete version, not the Multipage version now.
Comment 6 Ian 'Hixie' Hickson 2013-03-15 23:06:50 UTC
Got it. Fixed!