mooz / js2-mode

Improved JavaScript editing mode for GNU Emacs
GNU General Public License v3.0
1.33k stars 186 forks source link

setTimeout not in js2-browser-externs, but in js2-jslint-declaration-externs 'browser #546

Closed ArneBab closed 4 years ago

ArneBab commented 4 years ago

I wondered why setTimeout was marked as not declared.

In the code, I found it only in js2-node-externs, but not in js2-browser-externs.

Also it is included in jslint-declaration-externs for browser, so I think that it’s possible that it should be in js2-browser-externs, too.

I activated js2-include-node-externs to work around this, but that’s only a workaround.

(defvar js2-jslint-declaration-externs
  `(("browser" . ,(mapcar 'symbol-name
                          '(Audio clearInterval clearTimeout document
                            event history Image location name
                            navigator Option screen setInterval
                            setTimeout XMLHttpRequest)))

Best wishes,

dgutov commented 4 years ago

Somehow, that never came up. :)

Would you like to submit a PR?

ArneBab commented 4 years ago

Sorry that it took me a while … https://github.com/mooz/js2-mode/pull/556