23 lines · 761 B · JavaScript
RawDownload
/* global module *//* eslint-disable comma-dangle */// test dual-purpose module and standalone Entity scriptfunction MyEntity(filename) {    return {        preload: function(uuid) {            print("entityConstructorModule.js::preload");            if (typeof module === 'object') {                print("module.filename", module.filename);                print("module.parent.filename", module.parent && module.parent.filename);            }        },        clickDownOnEntity: function(uuid, evt) {            print("entityConstructorModule.js::clickDownOnEntity");        },    };} try {    module.exports = MyEntity;} catch (e) {} // eslint-disable-line no-emptyprint('entityConstructorModule::MyEntity', typeof MyEntity);(MyEntity);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t