Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var myWidgetTop = myWidget.el.getBoundingClientRect().top;
CLICRDV.events.addListener(window, 'message', function (e) {
// Only handle messages comming from clicrdv.com domain
if (/https?:\/\/([a-z0-9\-]+\.)?clicrdv\.com/.test(e.origin)) {
window.scrollTo( 0, myWidgetTop );
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment