C
C
command2015-11-13 09:15:45
Gnome
command, 2015-11-13 09:15:45

How to teach an applet to display HTML and JS?

Let's say we have this code:

const Applet = imports.ui.applet;

function MyApplet(orientation){
    this._init(orientation);
}

MyApplet.prototype = {
    __proto__: Applet.TextApplet.prototype,

    _init: function(orientation){
  Applet.TextApplet.prototype._init.call(this, orientation);

  try{
      this.set_applet_label("<b>TEXT</b>");
  }
  catch (e){
      global.logError(e);
  }
    }
};

function main(metadata, orientation){
    let myApplet = new MyApplet(orientation);
    return myApplet;
}

Source .
How to teach an applet to display HTML and JS?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question