node: --no-dom-globals CLI flag
Pull Request check-list
Please make sure to review and check all of these items:
-
Does make -j8 test
(UNIX) orvcbuild test nosign
(Windows) pass with this change (including linting)? -
Is the commit message formatted according to CONTRIBUTING.md? -
If this change fixes a bug (or a performance problem), is a regression test (or a benchmark) included? -
Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
Affected core subsystem(s)
Please provide affected core subsystem(s) (like buffer, cluster, crypto, etc)
Description of change
Introduce --no-dom-globals
CLI flag. With this flag set, following
globals won't be exported:
-
setTimeout
,clearTimeout
,setInterval
,clearInterval
,setImmediate
,clearImmediate
console
These are provided by the DOM implementation in browser, so the
--no-dom-globals
flag may be helpful when embedding node.js within
chromium/webkit.
Inspired-By: https://github.com/atom/node/commit/82e10ce94f3c90234dac187f04a47d4d357ffd31