Added: 4 years ago
From: GoogleDevelopers
Views: 25,790
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (17)

Sign In or Sign Up now to post a comment!
  • Does Google really Cross Domain?

  • Comment removed

  • you're*

  • the iframe "hack" isn't the only way of doing this. You can inject and remove script nodes to the DOM, and basically get the same results as with the iframe technique

  • Yeah, I've been using PHP to write JavaScript for years and lately have been dynamically adding the PHP/JavaScripts to a page with some GET variables attached via DOM. Instant 2-way. Writing a bookmarklet that drops the first script of a sequence onto the current document is a nice way to do this on any page you like. Iframes screw the back button, especially now that location.replace is gone on IE7.

  • Yeh. Google "dynodes +javascript"... I prefer the dynamic DOM script insertion method, personaly. But the iframe can help avoid some issues re resynching (use can tell when/if an iframe is fully loaded, you can't alway tell wen a script node is fully loaded - though you can usually by including a final 'imLoaded()' function and running it). It does create others though... Browser history mayhem for one.

  • While you cannot do it other way, it's maybe an ugly hack, but just the only one reliable way to do it as well.

    The clean way would be server-side proxying, but ...

  • That Iframe trick is just an ugly hack :p. I wonder if it will even will stay able in future browsers. On one hand the demand for client side crossdomain access is increasing but the risks are just too high right now.

  • Samples can be found at:

    code DOT google DOT com/apis/gdata/samples.html#Ja­vaScript

  • A just downloaded gdata file. Like Keith said it would be great to have video demo here, but thanks team its a start

  • A demo using the new library would be nice

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more