Board Thread:Support Requests - Getting Technical/@comment-24553580-20190916180029/@comment-27958705-20190916182734

neither of. wikitext have to be parsed by the server. read API:Parsing_wikitext.

why do you think that you need to add template via js? what are trying to achieve? there is might be other ways, simpler ones.