Posts with tag spotify play button

Using C3PO to load Spotify Play Button

C3PO is a small library developed by Stoyan Stefanov (I bet you know him, otherwise you should) as a way of getting rid off 3rd party Javascript code to load social widgets.

It allows injecting these widgets as iframes, instead of defining their containers and use certain 3rd party JS code to create and inject those iframes. In addition, it provides a simple parse function that you can call whenever you want to initialize these widgets. In addition, it exposes a way to send messages from the widget to the parent page using postMessage. In his example, the widget sends a resize message, that the parent element captures and changes the size of that widget accordingly.

Continue reading about Using C3PO to load Spotify Play Button...