Crestron Components Lib - Showcase App

ch5-image: error event

error event

Open the browser console to confirm the result of a event handler when the ch5-image is clicked.

Clicking this button will change ch5-image url into invalid value. A listener on the error event is triggered and will change the url value to 'http://via.placeholder.com/300x200' ( See the JS tab )

<p>Clicking this button will change ch5-image url into invalid value. 
A listener on the error event is triggered and will change the url value to 'http://via.placeholder.com/300x200' ( See the JS tab )</p>

<p> <button id="bad-url" class="button is-info" type="button">Change URL</button> </p>


<ch5-image
    id="demo"
    width="300px"
    height="200px"
    url="https://www.crestron.com/Crestron/media/Crestron/GeneralSiteImages/Featured%20Pages/Digital%20Media/all-in-one.jpg">
</ch5-image>