search

goog.dom.iframe.BLANK_SOURCE_NEW_FRAME_URL

All Known Aliases

Safe source for a new blank iframe that may not cause a new load of the iframe. This is different from goog.dom.iframe.BLANK_SOURCE in that it will allow an iframe to be loaded synchronously in more browsers, notably Gecko, following the javascript protocol spec.

NOTE: This should not be used to replace the source of an existing iframe. The new src value will be ignored, per the spec.

Due to cross-browser differences, the load is not guaranteed to be synchronous. If code depends on the load of the iframe, then goog.net.IframeLoadMonitor or a similar technique should be used.

According to http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#javascript-protocol the 'javascript:""' URL should trigger a new load of the iframe, which may be asynchronous. A void src, such as 'javascript:undefined', does not change the browsing context document's, and thus should not trigger another load.

Intentionally not about:blank, which also triggers a load.

NOTE: 'javascript:' URL handling spec compliance varies per browser. IE throws an error with 'javascript:undefined'. Webkit browsers will reload the iframe when setting this source on an existing iframe.