Skip to content

Subsequental call to script https://apis.google.com/js/client.js does not create iframe #492

@w00lf

Description

@w00lf

Hi there, we are using cdn version on gapi: https://apis.google.com/js/client.js, its embed in our sites body during the render:

<script src="https://apis.google.com/js/client.js?onload=someCallback"></script>

We are using a javascript/ruby library to speed up sites rendering time - Turbolinks. This library takes the body of the site and replaces it without rerendering the whole page, this speeds up page load. The problem is when pages body is replaced the call to script https://apis.google.com/js/client.js does not recreate Googles sign in iframes which client need in order to get access to the Google services if he is not logined into his account. How can we force this library to re-render these iframes? The brute force workaround is to set window variables that script using to null and then call the library, that works for now, but i dont think tis the most cleanest way.

Before rerender of body:
image
After rerender:
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions