@@ -282,10 +282,14 @@ function sendQuery(url, followReferral=false, followingReferral=true) {
282282
283283 if ( 0 == url . indexOf ( 'json://' ) ) {
284284 // run the callback with a mock XHR
285- handleResponse ( {
286- "status" : 200 ,
287- "response" : JSON . parse ( url . substring ( 7 ) )
288- } ) ;
285+ handleResponse (
286+ {
287+ "status" : 200 ,
288+ "response" : JSON . parse ( url . substring ( 7 ) )
289+ } ,
290+ followReferral ,
291+ followingReferral
292+ ) ;
289293
290294 } else {
291295 let xhr = createXHR ( url ) ;
@@ -295,7 +299,7 @@ function sendQuery(url, followReferral=false, followingReferral=true) {
295299 handleError ( 'Timeout performing query, please try again later.' ) ;
296300 } ;
297301
298- xhr . onload = function ( ) { handleResponse ( xhr , followReferral ) ; } ;
302+ xhr . onload = function ( ) { handleResponse ( xhr , followReferral , followingReferral ) ; } ;
299303
300304 xhr . onreadystatechange = function ( ) {
301305 if ( 4 == xhr . readyState && xhr . status < 1 ) {
@@ -343,7 +347,7 @@ function createErrorNode(error) {
343347}
344348
345349// callback executed when a response is received
346- function handleResponse ( xhr , followReferral = false ) {
350+ function handleResponse ( xhr , followReferral = false , followingReferral = false ) {
347351 thawUI ( ) ;
348352
349353 lastQueriedURL = xhr . responseURL ;
@@ -370,7 +374,7 @@ function handleResponse(xhr, followReferral=false) {
370374 try {
371375 var div = document . getElementById ( 'output-div' ) ;
372376 div . innerHTML = '' ;
373- div . appendChild ( processObject ( xhr . response , true ) ) ;
377+ div . appendChild ( processObject ( xhr . response , true , followReferral , followingReferral ) ) ;
374378
375379 var url = document . createElement ( 'a' ) ;
376380 url . href = window . location . href ;
@@ -389,7 +393,7 @@ function handleResponse(xhr, followReferral=false) {
389393
390394// process an RDAP object. Argument is a JSON object, return
391395// value is an element that can be inserted into the page
392- function processObject ( object , toplevel , followReferral = true ) {
396+ function processObject ( object , toplevel , followReferral = true , followingReferral = false ) {
393397 if ( ! object ) {
394398 console . log ( object ) ;
395399 return false ;
0 commit comments