()
| 586 | elem.addEventListener('touchstart', updater); |
| 587 | |
| 588 | function updater() { |
| 589 | // The selection can be in one of two modes: regexp-based or |
| 590 | // list-based. Construct regular expression depending on mode. |
| 591 | let re = regexpActive |
| 592 | ? search.value |
| 593 | : Array.from(getSelection().keys()).map(key => pprofQuoteMeta(nodes[key])).join('|'); |
| 594 | |
| 595 | setHrefParams(elem, function (params) { |
| 596 | if (re != '') { |
| 597 | // For focus/show/show-from, forget old parameter. For others, add to re. |
| 598 | if (param != 'f' && param != 's' && param != 'sf' && params.has(param)) { |
| 599 | const old = params.get(param); |
| 600 | if (old != '') { |
| 601 | re += '|' + old; |
| 602 | } |
| 603 | } |
| 604 | params.set(param, re); |
| 605 | } else { |
| 606 | params.delete(param); |
| 607 | } |
| 608 | }); |
| 609 | } |
| 610 | } |
| 611 | |
| 612 | function setHrefParams(elem, paramSetter) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…