1(function (root) { 2 'use strict'; 3 4 root.MKPwaUi = root.MKPwaUi || { layers: {} }; 5 6 root.MKPwaUi.layers.createLoggingLayer = function createLoggingLayer(config) { 7 var enabled = config.enableLogLayer === true; 8 9 function emit(level, args) { 10 if (!enabled || !console || typeof console[level] !== 'function') { 11 return; 12 } 13 console[level].apply(console, args); 14 } 15 16 return { 17 enabled: enabled, 18 info: function () { 19 emit('info', arguments); 20 }, 21 warn: function () { 22 emit('warn', arguments); 23 }, 24 log: function () { 25 emit('log', arguments); 26 }, 27 relayFromServiceWorker: function (data) { 28 if (!enabled || !data) { 29 return; 30 } 31 var level = (typeof data.level === 'string' && typeof console[data.level] === 'function') ? data.level : 'log'; 32 console[level]('[PWA<-SW]', data.event, data.payload || {}); 33 } 34 }; 35 }; 36})(window);
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.