Compartilhe sua voz
COMPARTILHE A SUA MENSAGEM COM CHEFS AO REDOR DO MUNDO
Mantenha a gente, e a comunidade global de chefs, informados de que você está seguro e como você está. Nos diga em que você está trabalhando ou quais planos você tem. Ou simplesmente deseje o bem a outros chefs em seu bairro, país ou em todo o mundo!
Tenha sua voz ouvida! Nós iremos compartilhar sua mensagem aqui.
// modified from same-domain version at www.dyn-web.com/tutorials/iframes/height/
function setIframeHeightCO(id, ht) {
console.log(ht);
var ifrm = document.querySelectorAll("iframe.field-iframe-instance")[0];
ifrm.style.visibility = 'hidden';
// some IE versions need a bit added or scrollbar appears
ifrm.style.height = ht + 4 + "px";
ifrm.style.visibility = 'visible';
}
// iframed document sends its height using postMessage
function handleDocHeightMsg(e) {
// check origin
if ( e.origin === 'http://web.barry-callebaut.com.com' ) {
// parse data
var data = JSON.parse( e.data );
// check data object
if ( data['docHeight'] ) {
console.log(data['docHeight']);
setIframeHeightCO( 'ifrm', data['docHeight'] );
} else if ( data['href'] ) {
setIframe('ifrm', data['href'] );
}
}
}
// assign message handler
if ( window.addEventListener ) {
window.addEventListener('message', handleDocHeightMsg, false);
} else if ( window.attachEvent ) { // ie8
window.attachEvent('onmessage', handleDocHeightMsg);
}