From 5da1d748c52362d1042a1ec24487668e9868624d Mon Sep 17 00:00:00 2001 From: Pluto Date: Mon, 8 Jun 2026 17:49:27 +0530 Subject: [PATCH 1/2] feat: add support to get started with live preview from a blank page --- .../documents/LiveHTMLDocument.js | 15 ++++++++++++++- src/nls/root/strings.js | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/LiveDevelopment/MultiBrowserImpl/documents/LiveHTMLDocument.js b/src/LiveDevelopment/MultiBrowserImpl/documents/LiveHTMLDocument.js index 4ff3a1fadc..9686ad405c 100644 --- a/src/LiveDevelopment/MultiBrowserImpl/documents/LiveHTMLDocument.js +++ b/src/LiveDevelopment/MultiBrowserImpl/documents/LiveHTMLDocument.js @@ -127,8 +127,21 @@ define(function (require, exports, module) { body = HTMLInstrumentation.generateInstrumentedHTML(this.editor, this.protocol.getRemoteScript()); } + if (!body) { + // generateInstrumentedHTML() returns null when the document is empty or its + // HTML cannot be parsed into a DOM (no instrumentable content). In that case it + // also never injected the remote