Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Remove innerHTML uses in the demo. #304

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
}
.output {
margin-top: 20px;
word-wrap: break-word;
white-space: pre-wrap;
font-family: monospace;
}
</style>
Expand Down Expand Up @@ -110,7 +110,7 @@ <h3><code>iron-form</code> works with native and custom elements, and can preven
</iron-form>
<script>
form1.addEventListener('iron-form-submit', function(event) {
this.querySelector('.output').innerHTML = JSON.stringify(event.detail);
this.querySelector('.output').innerText = JSON.stringify(event.detail, undefined, 2);
});
</script>
</template>
Expand Down Expand Up @@ -139,7 +139,7 @@ <h3>You can submit a form in many different ways: by manually calling <code>subm
</iron-form>
<script>
form2.addEventListener('iron-form-submit', function(event) {
this.querySelector('.output').innerHTML = JSON.stringify(event.detail);
this.querySelector('.output').innerText = JSON.stringify(event.detail, undefined, 2);
});
</script>
</template>
Expand All @@ -161,7 +161,7 @@ <h3>To customize the request sent to the server, you can listen to the <code>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);
});
</script>
</template>
Expand All @@ -186,7 +186,7 @@ <h3>Example of an <code>iron-form</code> reacting to state changes</h3>
</iron-form>
<script>
form4.addEventListener('iron-form-submit', function(event) {
this.querySelector('.output').innerHTML = JSON.stringify(event.detail);
this.querySelector('.output').innerText = JSON.stringify(event.detail, undefined, 2);
spinner.active = false;
spinner.hidden = true;
form4Submit.disabled = false;
Expand Down Expand Up @@ -226,7 +226,7 @@ <h3>Iron-form respects the <code>novalidate</code> form attribute</h3>
</iron-form>
<script>
form5.addEventListener('iron-form-submit', function(event) {
this.querySelector('.output').innerHTML = JSON.stringify(event.detail);
this.querySelector('.output').innerHTML = JSON.stringify(event.detail, undefined, 2);
});
</script>
</template>
Expand All @@ -252,7 +252,7 @@ <h3><code>iron-form</code> respects nested elements</h3>
</iron-form>
<script>
form6.addEventListener('iron-form-submit', function(event) {
this.querySelector('.output').innerHTML = JSON.stringify(event.detail);
this.querySelector('.output').innerHTML = JSON.stringify(event.detail, undefined, 2);
});
</script>
</template>
Expand Down