Sending manual dispatch event to Jweb through 'execute javascript'?

sandcobainer~'s icon

So I'm trying to get responsive web pages resize themselves on load. I'm trying to trigger the resize event without actually editing my patch (resizing jweb) in javascript as most websites have support for the 'onresize' event in JS.

This is my current patch, I'm sending the "executejavascript "var resizeEvent = new Event('resize'); window.dispatchEvent(resizeEvent);" message into jweb on loading a url with a bang.

browser_resize.maxpat
Max Patch