build(docs-infra): fix `StackblitzBuilder` after `jsdom` update (#41725)

In commit c617f1f768, `jsdom` was updated
from v9 to v16. This includes a breaking change that caused
`StackblitzBuilder` to fail to generate the StackBlitz examples.
However, this failure went unnoticed, because `StackblitzBuilder` still
completed successfully after failing to generate the examples. (This has
been fixed in the previous commit.)

This commit updates `StackblitzBuilder` to use the new `jsdom` API.

PR Close #41725
This commit is contained in:
George Kalpakas 2021-04-20 17:22:52 +03:00 committed by Jessica Janiuk
parent 5a80bc6eb5
commit 122c8ba0e3
1 changed files with 1 additions and 1 deletions

View File

@ -254,7 +254,7 @@ class StackblitzBuilder {
_createStackblitzHtml(config, postData) { _createStackblitzHtml(config, postData) {
const baseHtml = this._createBaseStackblitzHtml(config); const baseHtml = this._createBaseStackblitzHtml(config);
const doc = jsdom.jsdom(baseHtml); const doc = new jsdom.JSDOM(baseHtml).window.document;
const form = doc.querySelector('form'); const form = doc.querySelector('form');
for(const [key, value] of Object.entries(postData)) { for(const [key, value] of Object.entries(postData)) {