User:Lchrisman/How to embed an ACP model in the Wiki

Using a straight iframe on an eVite works, but is not what I want:

<iframe width="800" height="600" src="" />

The reason is that I don't want a Wiki session to launch on ACP every time someone visits the page. Instead, I'd like to have a button "See example model" that appears as a button initially, and only changes to an iframe when pushed.

My goal is to encapsulate that as a MediaWiki template, where you would just provide the template with the eVite (maybe width & height).

Seems like this needs some JavaScript. You can use JavaScript in a MediaWiki template by placing the JS in MediaWiki:Common.js. But it isn't obvious to me from MediaWiki docs how you call it from Media Wiki markup. Since MediaWiki:Common.js is loaded by every page displayed, it is important to get that right lest I bring down the entire Wiki.