w3c / performance-timeline

Performance Timeline
https://w3c.github.io/performance-timeline/
Other
111 stars 27 forks source link

Add some exports used elsewhere #197

Closed npm1 closed 2 years ago

npm1 commented 2 years ago

This PR adds some export and applies some fixes for current warnings. When digging into https://github.com/WICG/element-timing/issues/67, I notice that some PerformanceTimeline objects are being manually imported. But this includes some IDL objects. I suspect I shouldn't have to do this?


Preview | Diff

npm1 commented 2 years ago

By the way, I tried removing the manual import for e.g. PerformanceEntry and it does not find the object in the Element Timing spec. I don't think we're supposed to manually export every IDL object we want to use elsewhere, but not sure what's wrong.

marcoscaceres commented 2 years ago

I suspect I shouldn't have to do this?

Yeah, IDL definitions automatically get exported. So, feel free to remove the class="export".

By the way, I tried removing the manual import for e.g. PerformanceEntry and it does not find the object in the Element Timing spec. I don't think we're supposed to manually export every IDL object we want to use elsewhere, but not sure what's wrong.

Right. The document needs to first to end up on /TR/, and then every 6 hours.

I can see that {{PerformanceEntry}} is already in the definitions database: https://respec.org/xref/?term=PerformanceEntry

Happy to take a look at Element Timing if it's not linking correctly.

npm1 commented 2 years ago

Thanks for confirming. I have removed the unneeded exports from the PR.

Regarding the Element Timing issue, if I remove this line[1] then bikeshed complains with

LINK ERROR: No 'idl-name' refs found for 'PerformanceEntry'.
<a class="n" data-link-type="idl-name" data-lt="PerformanceEntry">PerformanceEntry</a>

I'm not sure how to debug that. The link error seems to come from the IDL for PerformanceElementTiming.

[1] https://github.com/WICG/element-timing/blob/main/index.bs#L18

marcoscaceres commented 2 years ago

Regarding the Element Timing issue, if I remove this line[1] then bikeshed complains with...

Yeah, that's weird... you shouldn't need <pre class=anchors> at all as specs should be exporting their definitions :(