New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate static and dynamic parts #1668
Comments
The reason that these things get removed is that the W3C doesn't allow arbitrary JS in /TR/ documents: it only allows fixup.js to be included. I'm happy for us to have a discussion with the W3C about including more JS things on TR. However, I feel that remains the precursor before we can have a discussion about how to do it. |
@plehegar, tl;dr: ReSpec in "live mode" (e.g., Editor's drafts) adds useful things like buttons that allow readers to copy/paste WebIDL with one click. The W3C currently doesn't allow JS on TR (apart from fixup.js), so we are wondering... what would we need to be allowed to ship some additional JS on TR? |
Bikeshed adds inline scripts, maybe we can do the same? |
On documents published on /TR/? If yes, then we can make a case to the W3C. |
Yes, check this out for example: https://www.w3.org/TR/webaudio/ |
https://www.w3.org/TR/clreq/ has an arbitrary JS file. Not sure it's explicitly allowed or not. |
Ok, we can definitely do the either inline or we can host our own scripts. I'd personally like to have the scripts hosted (same a ReSpec currently is)... we have very few scripts that would need hosting. Primarily the copy/paste IDL one. |
Missed this somehow, catching up... It is no longer true that we don't allow JS except for fixup.js. W3C TR allows "recognized" JS. The list is at https://www.w3.org/scripts/ (this is not a public page apparently, not sure why). https://www.w3.org/TR/webaudio/ uses MathJAX for example. https://www.w3.org/TR/clreq/ might be a mistake however (but pubrules doesn't seem to flag it). The philosophy remains towards avoiding the use of JS if possible and strongly respecting the security and privacy of our users (so nothing outside w3.org unless exceptions). But we do recognize that the modern Web makes extensive use of it and we welcome it in particular when it provides additional value on top of the text context of the specification. I expect our use of JS to increase overtime in that spirit (better integration with MDN, WPT, caniuse, etc.). |
As a reference, here is the announcement: https://lists.w3.org/Archives/Public/spec-prod/2015JulSep/0014.html |
Thanks for the details! I don't expect our script to be persistent and immutable, though... |
I guess we just want the clipboard.js script to be hosted, right? We should also look at externalizing jQuery for those that need it still instead of bundling it. Just having jQuery outside the library would be a massive win for a lot of specs. |
(the jQuery thing unrelated to TR docs... but still) |
Probably also caniuse and MDN. Those can be static but should be dynamic to keep the numbers updated. |
Yes, good suggestions. |
For example:
webidl-clipboard.js
has a part that can be static (adding clipboard copy buttons) and a dynamic UI part (adding event listeners to those added buttons). Currently respec2html removes any dynamic UI features and this causes weird situation that users cannot use the feature in respec2html-generated page.We may separate those two parts so that we can ultimately:
What do you think?
The text was updated successfully, but these errors were encountered: