This file is indexed.

/usr/lib/python2.7/dist-packages/notebook/static/base/js/events.js is in python-notebook 5.2.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.

// Give us an object to bind all events to. This object should be created
// before all other objects so it exists when others register event handlers.
// To register an event handler:
//
// require(['base/js/events'], function (events) {
//     events.on("event.Namespace", function () { do_stuff(); });
// });

define(['jquery', 'base/js/namespace'], function($, Jupyter) {
    "use strict";
    
    // Events singleton
    if (!window._Events) {
        window._Events = function () {};
        window._events = new window._Events();
    }
    
    // Backwards compatability.
    Jupyter.Events = window._Events;
    Jupyter.events = window._events;
    
    var events = $([window._events]);

    // catch and log errors in triggered events
    events._original_trigger = events.trigger;
    events.trigger = function (name, data) {
        try {
            this._original_trigger.apply(this, arguments);
        } catch (e) {
            console.error("Exception in event handler for " + name, e, arguments);
        }
    }
    return events;
});