--- a/src/widgets/SpelSyncHtml.js Sun Nov 12 22:07:33 2017 +0100
+++ b/src/widgets/SpelSyncHtml.js Wed Sep 04 17:32:50 2024 +0200
@@ -1,18 +1,18 @@
-IriSP.Widgets.SpelSyncHtml = function(player, config) {
+const SpelSyncHtml = function(ns) {
+ return class extends ns.Widgets.Widget {
+ constructor(player, config) {
+ super(player, config);
console.log("Calling IriSP.Widget's constructor from IriSP.HelloWorldWidget");
- IriSP.Widgets.Widget.call(this, player, config);
};
-IriSP.Widgets.SpelSyncHtml.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.SpelSyncHtml.prototype.defaults = {
+static defaults = {
src: "about:blank"
};
-IriSP.Widgets.SpelSyncHtml.prototype.template =
+static template =
'<div class="Ldt-SpelSyncHtml"><iframe src="{{src}}" {{#width}}width="{{width}}"{{/width}} {{#height}}height="{{height}}"{{/height}}</div>';
-IriSP.Widgets.SpelSyncHtml.prototype.draw = function() {
+draw() {
this.renderTemplate();
var frame = this.$.find("iframe")[0],
basesrc = this.src.replace(/#.*$/,'');
@@ -23,4 +23,7 @@
}
});
});
-};
\ No newline at end of file
+};
+ }}
+
+export { SpelSyncHtml };
\ No newline at end of file