Skip to content
Snippets Groups Projects

Send messages to the parent window when things happen

Closed Eric Rasmussen requested to merge erasmussen2/UNL_Search:iframe-message into master
1 file
+ 9
0
Compare changes
  • Side-by-side
  • Inline
+ 9
0
@@ -197,6 +197,11 @@ define(['jquery', 'analytics'], function ($, analytics) {
@@ -197,6 +197,11 @@ define(['jquery', 'analytics'], function ($, analytics) {
setTimeout(function() {
setTimeout(function() {
if (!searchToggleLock && localGoogleSearch && control == localGoogleSearch.control && $('.gs-no-results-result', $root).length) {
if (!searchToggleLock && localGoogleSearch && control == localGoogleSearch.control && $('.gs-no-results-result', $root).length) {
$root.closest('.results-group').find('.result-tab li:last-child').click();
$root.closest('.results-group').find('.result-tab li:last-child').click();
 
 
if (window.parent) {
 
window.parent.postMessage('wdn.search.noLocal', "*");
 
}
 
return;
return;
}
}
}, 1000);
}, 1000);
@@ -205,6 +210,10 @@ define(['jquery', 'analytics'], function ($, analytics) {
@@ -205,6 +210,10 @@ define(['jquery', 'analytics'], function ($, analytics) {
$root.closest(googleSel).slideDown();
$root.closest(googleSel).slideDown();
searchToggleLock = false;
searchToggleLock = false;
 
 
if (window.parent) {
 
window.parent.postMessage('wdn.search.queryComplete', "*");
 
}
};
};
var fullQuery = function(q, track) {
var fullQuery = function(q, track) {
Loading