def __init__(self):
        
        self.ws = None
        self.last_msg = None
        self.is_notebook = False  # if not, we "close" when the ws closes
        # For nodejs, the location is set by the flexx nodejs runtime.
        loc = location
        self.ws_url = ((loc.hostname, loc.port, loc.pathname) % 'ws://%s:%s/%s/ws')
        self.is_exported = False
        self.classes = {}
        self.instances = {}
        if typeof(window) is 'undefined' and typeof(module) is 'object':
            # nodejs (call exit on exit and ctrl-c
            root.window = root  # create alias
            self.nodejs = True
            window.setTimeout(self.init, 1)  # ms
            window.process.on('exit', self.exit, False)
            window.process.on('SIGINT', self.exit, False)
            window.setTimeout(self.exit, 10000000)  # keep alive ~35k years
        else:
            # browser
            window.addEventListener('load', self.init, False)
            window.addEventListener('beforeunload', self.exit, False)
dataset/ETHPy150Open zoofIO/flexx/flexx/app/clientcore.py/FlexxJS.__init__/swapped operands of `%`