<html>
<body>
<h1>UI Events</h1>
<h2>The view Property</h2>
<p>Click the button to get the event view.</p>
<button onclick="myFunction(event)">Try it</button>
<p id="demo"></p>
<script>
function myFunction(event) {
let myObject = event.view;
document.getElementById("demo").innerHTML = myObject.name;
}
</script>
</body>
</html>