Remove global Buffer mention now handled as require wrapper

This commit is contained in:
Kevin Sawicki 2017-02-06 15:01:10 -08:00
parent 7e138083ef
commit 1933a4fc9f

View file

@ -80,22 +80,3 @@ This is not bulletproof, but at the least, you should attempt the following:
Again, this list merely minimizes the risk, it does not remove it. If your goal Again, this list merely minimizes the risk, it does not remove it. If your goal
is to display a website, a browser will be a more secure option. is to display a website, a browser will be a more secure option.
## Buffer Global
Node's [Buffer](https://nodejs.org/api/buffer.html) class is currently available
as a global even when the `nodeintegration` attribute is not added. You can
delete this in your app by doing the following in your `preload` script:
```js
delete global.Buffer
```
Deleting it may break Node modules used in your preload script and app since
many libraries expect it to be a global instead of requiring it directly via:
```js
const {Buffer} = require('buffer')
```
The `Buffer` global may be removed in future major versions of Electron.