DataFormsJS v5.9.1 Release Notes

Release Date: 2021-08-06 // over 2 years ago
    • 🌐 Web Component <json-data>
      • Updated logic related to the HTML onready event attribute to only run JavaScript code if the <json-data> is still connected to the page when the web service completes.
      • For SPA if the user clicks of the page on a long running task then fetch will still be running but the element will not longer be connected.
      • This would result in an error being shown to the user if an expected element or other item is missing from the page.
      • In the example below if the user clicked of the page quickly an error alert would be displayed by default, this update prevents the code from running so the end user has a better and expected experience. html <json-data onready="() => { document.getElementById('element1').textContent = document.getElementById('element2').textContent; }"