Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;(function(global,$)
- {
- "use-strict"
- var frame = $.createElement('iframe')
- // propiedades del iframe, se han eliminado los no soportados en HTML5
- // (IFrame properties)[https://www.w3schools.com/tags/tag_iframe.asp]
- frame.width = "100%"
- frame.height = "530px"
- frame.style.border = "none" // equivalente a frameBorder = "0"
- if (global.navigator.onLine) {
- /* google no permite utilizar su sitio en iframes por
- (X-Frame-options)[https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options]
- */
- frame.src = "https://google.com.co" // no funciona ver enlace de arriba
- } else {
- frame.src = "sinconexion.html" // valido ya que pertenece al mismo sitio
- }
- $.body.appendChild(frame)
- }(window, document))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement