From 7d3b123afc57d8461c2b7b0d20045da7473654bc Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Wed, 1 Jan 2020 17:41:07 -0500 Subject: [PATCH] Replace runVMScript() with getInternalVMContext() This allows more flexibility for vm-using consumers. Closes #2731. --- README.md | 20 +++++++++------- lib/api.js | 4 ++-- .../living/helpers/create-event-accessor.js | 3 +-- test/api/methods.js | 24 ++++++++++--------- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 69fa1d0d93..2d09dff0db 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ This is turned off by default for performance reasons, but is safe to enable. Note that we strongly advise against trying to "execute scripts" by mashing together the jsdom and Node global environments (e.g. by doing `global.window = dom.window`), and then executing scripts or test code inside the Node global environment. Instead, you should treat jsdom like you would a browser, and run all scripts and tests that need access to a DOM inside the jsdom environment, using `window.eval` or `runScripts: "dangerously"`. This might require, for example, creating a browserify bundle to execute as a `