(location)
| 391 | } |
| 392 | |
| 393 | function findTarget(location) { |
| 394 | function jumpToTarget() { |
| 395 | var jumpPosition = getElementPosition(target); |
| 396 | |
| 397 | log(iframeId,'Moving to in page link (#'+hash+') at x: '+jumpPosition.x+' y: '+jumpPosition.y); |
| 398 | pagePosition = { |
| 399 | x: jumpPosition.x, |
| 400 | y: jumpPosition.y |
| 401 | }; |
| 402 | |
| 403 | scrollTo(); |
| 404 | log(iframeId,'--'); |
| 405 | } |
| 406 | |
| 407 | function jumpToParent() { |
| 408 | if (window.parentIFrame) { |
| 409 | window.parentIFrame.moveToAnchor(hash); |
| 410 | } else { |
| 411 | log(iframeId,'In page link #'+hash+' not found and window.parentIFrame not found'); |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | var |
| 416 | hash = location.split('#')[1] || '', |
| 417 | hashData = decodeURIComponent(hash), |
| 418 | target = document.getElementById(hashData) || document.getElementsByName(hashData)[0]; |
| 419 | |
| 420 | if (target) { |
| 421 | jumpToTarget(); |
| 422 | } else if(window.top!==window.self) { |
| 423 | jumpToParent(); |
| 424 | } else { |
| 425 | log(iframeId,'In page link #'+hash+' not found'); |
| 426 | } |
| 427 | } |
| 428 | |
| 429 | function callback(funcName,val) { |
| 430 | return chkCallback(iframeId,funcName,val); |
no test coverage detected
searching dependent graphs…