Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I add event listeners to JET web components

3807449Feb 27 2020 — edited Feb 29 2020

I'm working to import JET web components into my typescript project and trying to create a simple onclick example.

How would I take an oj-button and add an event listener for its click event?

<body class="oj-web-applayout-body">
<div id="globalBody">
  <oj-button onclick="(function() { console.log('Hello world') }) ()">Button</oj-button>
</div>
<script type="text/javascript" src="js/libs/require/require.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</body>

Comments
Post Details
Added on Feb 27 2020
3 comments
722 views