Web IDL spec says:
For all of these constructs [named definitions, attributes, typedefs, dictionary members, constants, and operations], the identifier is the value of the identifier token with any leading U+005F LOW LINE ("_") character (underscore) removed.
However, webidl2.js no longer seems to remove some underscores, from identifiers that did not need them to start with:
> require('webidl2').parse('interface _Int {};')
[ { type: 'interface',
name: '_Int',
partial: null,
members: [],
trivia:
{ base: '', name: ' ', open: ' ', close: '', termination: '' },
inheritance: null,
extAttrs: null },
{ type: 'eof', trivia: '' } ]
Web IDL spec says:
However, webidl2.js no longer seems to remove some underscores, from identifiers that did not need them to start with: