JSFiddle - React, Tailwind, and code Playground

HTML

<p id="open-p">i will accidentally call document.open()</p>

<p id="write-p">i will accidentally call document.write()</p>

JavaScript

$(function() {
    $('#open-p').on('click', function() {
        $.event.trigger('open');
    });
    $('#write-p').on('click', function() {
        $.event.trigger('write');
    });
});