View grammar.js
const Grammar = require('syntax-cli').Grammar;
const LLParsingTable = require('syntax-cli').LLParsingTable;
const jsdom = require("jsdom");
function getRulesFromDOM(window) {
let rules = window.document.querySelectorAll("pre.grammar[id]");
return [].map.call(rules, pre => pre.textContent);
}
const REGEXP = /(\s*:\n\s*)|\b(integer|float|identifier|string|whitespace|comment|other)\b|(\s*\n\s*)|(ε)/g;
View current.webidl
[Exposed=Window,
NoInterfaceObject]
interface WindowSessionStorage {
readonly attribute Storage sessionStorage;
};
Window implements WindowSessionStorage;
View crypto.webidl
[NoInterfaceObject, Exposed=(Window,Worker)] // seems redundant
interface GlobalCrypto {
[Throws] readonly attribute Crypto crypto;
};
Window implements GlobalCrypto;
WorkerGlobalScope implements GlobalCrypto;
View Inheriting "Mixins"
# Here we're looking for NoInterfaceObjects that have a base class.
# Luckily the only one we could find is not used as a mixin.
# awk '/NoInterfaceObject/,/};/' *.webidl | grep -o "interface .*:.* {" | cut -d" " -f4 | sort -u
BoxObject
View traverse.js
function traverse_inherited_and_consequential_interfaces(stack, callback) {
var I = stack.pop();
callback(I);
I.array["implements"][I.name].forEach(id => {
var mixin = I.array.members[id];
if (!mixin) {
throw new Error("Interface " + id + " not found (implemented by " + I.name + ")");
}
var interfaces = mixin.get_inheritance_stack();
traverse_inherited_and_consequential_interfaces(interfaces, callback);
View desired.output.js
parsed_idl.members.forEach(function(member) {
this.members[parsed_idl.name].members.push(
new IdlInterfaceMember(member)
);
}.bind(this));
View Legacy callback interface object.bs
<h4 id="legacy-callback-interface-object">Legacy callback interface object</h4>
The [=legacy callback interface object=] for a given [=callback interface=]
is a [=function object=].
It has properties that correspond to the [=constants=] defined on that interface,
as described in sections [[#es-constants]].
Note: Since an interface object is a [=function object=]
the <code>typeof</code> operator will return "function"
when applied to a [=legacy callback interface object=].
View algo.txt
<div algorithm>
To compute the <dfn lt="IntegerPart">integer part</dfn> of an ECMAScript number |n|,
the following steps must be taken:
1. Let |r| be [=floor=]([=abs=](|n|))
1. If |n| &lt; 0,
then return -1 * |r|.
1. Otherwise return |r|.
</div>
View comment.md.txt
Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=29450.
<!--
This comment and the below content is programatically generated.
You may add a comma-separated list of anchors you'd like a
direct link to below (e.g. #idl-serializers, #idl-sequence):
Don't remove this comment or modify anything below this line.
-->
View a.txt
1. If |F| corresponds to an attribute, operation or stringifier, then return
the global environment associated with the
[=interface=] that definition appears on.
1. Otherwise, if |F| corresponds to an indexed or named property, then return
the global environment associated with the interface that
the indexed or named property getter, setter or deleter was defined on.