A
A
Alex2017-03-24 17:28:29
JavaScript
Alex, 2017-03-24 17:28:29

How to render a widget on the server side?

There is a widget that is usually inserted into the html code of the page. Its code looks like this:

<script async src="//widget_domain.com/widget_code.js"></script>
<div class="widget" widget-id="..."></div>
<script>
window.widget.start()
</script>

After launch, the widget loads a few more JS files and creates div.widgetiframeone with its content.
Actually the question is: if there is a way to run this code on the server side in order to send an already created widget to the browser from iframeinside?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
g00dv1n, 2017-03-24
@g00dv1n

Rewrite the widget in something that can be done with SSR or PhantomJs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question