PageSourceSearch

https://www.arwag.at/_resources/app/themes/arwag/js/controllers/ActionForwardController.js?m=1766124355

js arwag.at collected 2026-10-02 20:04:23 UTC 1,025 bytes, 32 lines download raw bytes

1import {Controller} from "@hotwired/stimulus"
2
3export default class ActionForwardController extends Controller {
4
5    static targets = [
6        'receiver',
7    ];
8
9    forward(evt) {
10        const mappingStrings = evt.params.mappings.split(';');
11        mappingStrings.forEach(mapping => {
12            let [ignore, eventName, mappedEventName, targetSelector] = mapping.match(/(.*)=>(.*)@(.*)/);
13            console.log([eventName, mappedEventName, targetSelector]);
14            if (evt.type !== eventName) {
15                return;
16            }
17            mappedEventName = mappedEventName || eventName;
18            this.element.querySelectorAll(targetSelector).forEach((el) => {
19                var event = new CustomEvent(mappedEventName, {
20                    bubbles: true,
21                    cancelable: true,
22                    detail: evt.detail
23                });
24                console.log(event);
25                el.dispatchEvent(event);
26            })
27        });
28    }
29
30}
31
32export {ActionForwardController}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.