The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
| /** | |
| * Remove acentos de caracteres | |
| * @param {String} stringComAcento [string que contem os acentos] | |
| * @return {String} [string sem acentos] | |
| */ | |
| function removerAcentos( newStringComAcento ) { | |
| var string = newStringComAcento; | |
| var mapaAcentosHex = { | |
| a : /[\xE0-\xE6]/g, | |
| e : /[\xE8-\xEB]/g, |
Migrei o post para meu blog, por favor clique no link abaixo:
http://blog.rafaelrosafu.info/2013/07/16/imigrando-e-vivendo-no-canada-um-guia-nada-imparcial.html
Obrigado aos que deixaram comentários :)
| /* | |
| Copyright (c) 2017 Chris Patuzzo | |
| https://twitter.com/chrispatuzzo | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |