Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
feat(webidl-contiguous): Warn if IDL member lacks dfn (closes speced#935
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcos Cáceres committed Dec 15, 2016
1 parent e9fb1c6 commit e057720
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/core/webidl-contiguous.js
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,10 @@ define(
if (dfns.length > 1) {
pubsubhub.pub("error", "Multiple <dfn>s for " + name + (parent ? " in " + parent : ""));
}
if (dfns.length === 0) {

if (dfns.length === 0 && name !== "serializer" && name !== "stringifier") {
const msg = "No <dfn> for " + name + (parent ? " in " + parent : "") + ".";
pubsubhub.pub("warn", msg);
return undefined;
}
var dfn = dfns[0];
Expand Down

0 comments on commit e057720

Please sign in to comment.