From 62a07ca39bace3ec2265926c1b73d207c341c922 Mon Sep 17 00:00:00 2001 From: Russell Bicknell Date: Mon, 27 Feb 2023 11:58:19 -0800 Subject: [PATCH] Remove `innerHTML` uses in the demo. --- demo/index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/demo/index.html b/demo/index.html index 78270ca..c7785df 100644 --- a/demo/index.html +++ b/demo/index.html @@ -66,7 +66,7 @@ } .output { margin-top: 20px; - word-wrap: break-word; + white-space: pre-wrap; font-family: monospace; } @@ -110,7 +110,7 @@

iron-form works with native and custom elements, and can preven @@ -139,7 +139,7 @@

You can submit a form in many different ways: by manually calling subm @@ -161,7 +161,7 @@

To customize the request sent to the server, you can listen to the iro this.request.params['sidekick'] = 'Robin'; }); form3.addEventListener('iron-form-submit', function(event) { - this.querySelector('.output').innerHTML = JSON.stringify(event.detail); + this.querySelector('.output').innerText = JSON.stringify(event.detail, undefined, 2); }); @@ -186,7 +186,7 @@

Example of an iron-form reacting to state changes

@@ -252,7 +252,7 @@

iron-form respects nested elements