1/* 2 * Copyright 2023 Anyware Services 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17if (!AmetysFront.Event) 18{ 19 AmetysFront.Event = { 20 _listeners: {}, 21 22 fire: function(event, data) 23 { 24 var listeners = AmetysFront.Event._listeners[event] || []; 25 for (var i=0; i < listeners.length; i++) 26 { 27 listeners[i](data); 28 } 29 }, 30 31 listen: function(event, listener) 32 { 33 AmetysFront.Event._listeners[event] = AmetysFront.Event._listeners[event] || []; 34 AmetysFront.Event._listeners[event].push(listener); 35 }, 36 37 unlisten: function(event, listener) 38 { 39 // TODO 40 } 41 }; 42}
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.