"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/templates/package-javascript/lib/__package-name__-view.js.template" (7 Feb 2017, 684 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 'use babel';
    2 
    3 export default class __PackageName__View {
    4 
    5   constructor(serializedState) {
    6     // Create root element
    7     this.element = document.createElement('div');
    8     this.element.classList.add('__package-name__');
    9 
   10     // Create message element
   11     const message = document.createElement('div');
   12     message.textContent = 'The __PackageName__ package is Alive! It\'s ALIVE!';
   13     message.classList.add('message');
   14     this.element.appendChild(message);
   15   }
   16 
   17   // Returns an object that can be retrieved when package is activated
   18   serialize() {}
   19 
   20   // Tear down any state and detach
   21   destroy() {
   22     this.element.remove();
   23   }
   24 
   25   getElement() {
   26     return this.element;
   27   }
   28 
   29 }