google / google/closure-compiler

Missing documentation on supported advanced DOM types

Open
#4,036 0 comments 0 reactions 0 assignees View on GitHub
triage-done
Dominant language
JavaScript
Stars
7.7k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
6

Description

[According to the documentation of available types](https://github.com/google/closure-compiler/wiki/Types-in-the-Closure-Type-System), the only type to describe DOM elements is `Element`.

However, I went through the source code of GCC and found [this externs declarations for DOM](https://github.com/google/closure-compiler/blob/master/externs/browser/w3c_dom2.js), plus some other externs files in the same directory, where some advanced DOM types such as `HTMLDivElement` are defined, so it seems that there is support for more than just the `Element` type.

It would be very useful to add a word or two about this in the documentation/wiki - preferably [here](https://github.com/google/closure-compiler/wiki/Types-in-the-Closure-Type-System) and supply a link to the source code. So that it can be clear and easy to understand which DOM types are supported and which are not.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.