w3c / beacon

Beacon
https://w3c.github.io/beacon/
Other
46 stars 22 forks source link

Clean up the Dependencies section - fix #47 #50

Closed siusin closed 6 years ago

siusin commented 6 years ago

To fix #47 .

I failed to find a good way to fix the warning,

No for operation sendBeacon in Navigator

The suggestion in the warning dialog doesn't work out.


Preview | Diff

igrigorik commented 6 years ago

@siusin awesome work! On a first pass, this looks good.

Re, sendBeacon warning: @marcoscaceres any tips on this one? Preview: https://cdn.rawgit.com/siusin/beacon/97428ec4a08aafce48ff698caf5e6c2ea8e9628d/index.html

marcoscaceres commented 6 years ago

Just noting that I'm aware that having to add data-dfn-for="Navigator" data-dfn-for="Navigator" is very annoying (as a spec Editor, I too feel this pain).

I will teach ReSpec to add those automatically in the future - and then only yell when there is ambiguity.

As always, I appreciate feedback to make the tool easier to use - and, as ReSpec is open source, contributions from the community are very much welcome.

siusin commented 6 years ago

@marcoscaceres thanks for the tips!

We got a few unexpected warning messages after the update --

Found linkless element with text 'sendbeacon' but no matching <dfn>

We are using <a>sendBeacon</a> to link to the method, any thoughts?

marcoscaceres commented 6 years ago

having a look

marcoscaceres commented 6 years ago

Ok, generally you wouldn't do this, but as this spec is only about one method:

Change body to:

<body data-link-for="Navigator">

Change the sendBeacon dfn to:

<h3><code><dfn>sendBeacon()</dfn></code> Method</h3>

And then, do a find a replace, and change all:

<a>sendBeacon</a>

to:

<a>sendBeacon()</a>
marcoscaceres commented 6 years ago

Noting, "data-link-for" is telling ReSpec, "if you can't find a xref for something, it's probably something on Navigator".

marcoscaceres commented 6 years ago

(if it gives you any more grief, please feel free to merge and I can take over any last remaining issues... but testing the above locally, it works). You can grab it from here:

https://gist.github.com/marcoscaceres/0e8c12ab51d1ae817f98878fe478b896

marcoscaceres commented 6 years ago

oh, yeah 🥓 🥓 🥓 🥓!

siusin commented 6 years ago

Yeah, everything works perfectly now ;)

@marcoscaceres ++

marcoscaceres commented 6 years ago

you might want to give that a:

tidy -config tidyconfig.txt -o index.html index.html
siusin commented 6 years ago

Sure, will fix the bugs reported by HTML Tidy later.

igrigorik commented 6 years ago

@marcoscaceres @siusin \o/ .. thanks for the great work on this one!

Left one nitpick on "referrer source" discussion, but we can also take that one as a separate update. @siusin I'll defer to you.

igrigorik commented 6 years ago

@siusin @marcoscaceres thanks (again) to both of you for the great work on this!