Maybe source_origin could support also arrays.
In this way receiveMessage() can be invoked in following way:
$.receiveMessage(function(e) {
....
}, [
'http://example.com',
'http://test.example.com',
'https://example.com'
]);
The change should be simple, just add following line in receiveMessage() between line 182 and line 183.
182 if ( ( typeof source_origin === 'string' && e.origin !== source_origin )
==> || ( $.isArray( source_origin ) && $.inArray( e.origin, source_origin ) === -1 )
183 || ( $.isFunction( source_origin ) && source_origin( e.origin ) === FALSE ) ) {
184 return FALSE;
185 }
Regards
-Erich
Maybe source_origin could support also arrays.
In this way receiveMessage() can be invoked in following way:
The change should be simple, just add following line in receiveMessage() between line 182 and line 183.
Regards
-Erich