Exact syntax to get JavaScript to render HTML in a file

What I’m trying to do

I’m trying to use a fetchOpenGraphData function from a nifty-link-card.js file to render HTML in the Obsidian file I am working from. nifty-link-js works exactly as expected in the browser.

Things I have tried

I have installed RunJS, CustomJS, JS-Engine, Templater, and Dataview. I have read the documentation for every single one and asked for help on a few of their GitHub repos.

I have used the codeblock syntax:

fetchOpenGraphData(url);
<%+ tp.fetchOpenGraphData(tp, url) %>

NOWHERE, AND I MEAN ANYWHERE, are there exact, specific instructions on how to call JavaScript functions that render content in the same file the user is working from. I have learned to do cool things with Dataview, but this function makes an API call to OpenGraph.io and comes back with the necessary info to render a pretty HTML card. I just can’t find anywhere how to implement it. EXACT SYNTAX, EXACT PROCESS.