JavaScript / HTML5 的机器可读 (WebIDL) 参考?
我正在寻找 JavaScript 类(成员、方法、参数...)的机器可读参考,特别是与 HTML5 标准(画布、存储等)相关的参考。
到目前为止我找到的只是W3C网站上的规范,其中包括规范的一部分,fi http ://dev.w3.org/html5/2dcontext/ 中有 CanvasRenderingContext2D 的 Web IDL,其他页面有其他部分。
但我一定是盲目的,因为我找不到一些全局索引/摘要,其中所有有效的 IDL 按版本/草稿/等排序和分类。
有谁知道在哪里可以找到它吗?
I'm looking for a machine-readable reference of JavaScript classes (members, methods, parameters...), especially related to the HTML5 standard (canvas, storage, etc.).
All I have found so far is the specs on the W3C site, which include a part of the specification, f.i. http://dev.w3.org/html5/2dcontext/ has in it the Web IDL for CanvasRenderingContext2D, and other pages have other portions.
But I must be blind as I couldn't find some global index/summary with all the valid IDLs sorted and classified by version/drafts/etc.
Anyone know where it can be found?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
HTML5 仍在不断变化,因此任何官方参考栏的规范几乎都不可避免地会过时。
最好的选择是直接从规范中获取数据。解析文件,然后提取类
idl
的所有pre
元素。这是您的机器可读列表。保证官方且最新。HTML5 is still changing, so any official reference bar the spec is almost inevitably going to be out of date.
Your best bet is to suck the data straight out of the spec. Parse the file and then extract all the
pre
elements with classidl
. That's your machine readable list. Guaranteed official and up-to-date.问 Ian Hickson(本回答时的规范编辑),以下是他的回复的编辑摘要:
Asked Ian Hickson (editor of the spec at the time of this answer), here is an edited summary of his reply:
不确定它是否是 WebIDL,但 WebKit Source 有很多
.idl
文件与.cpp
和.h
文件混合在一起。您可以在线浏览源码。从 WebCore 开始,深入研究一些子目录。Not sure if it is WebIDL, but the WebKit Source has lots
.idl
files mixed in with the.cpp
and.h
files. You can browse the source online. Start at WebCore and dig into some of the subdirectories.您在找这个吗?
http://code.haskell.org/yc2js/W3C/
Are you looking for this?
http://code.haskell.org/yc2js/W3C/
Mozilla 使用的 WebIDL 可以在 http://mxr.mozilla.org 找到/mozilla-central/source/dom/webidl/
The WebIDLs used by Mozilla can be found at http://mxr.mozilla.org/mozilla-central/source/dom/webidl/
请参阅以下链接:
相关规格:
http://www.w3.org/wiki/Web_IDL#Dependent_Specifications
See below link:
Dependent Specifications:
http://www.w3.org/wiki/Web_IDL#Dependent_Specifications