Migration of emby-buttton, paper-icon-button-light, emby-collapse, emby-imput to ES6 modules

This commit is contained in:
Cameron 2020-07-15 11:41:59 +01:00
parent fd853a180a
commit 9e2d289265
5 changed files with 67 additions and 39 deletions

View file

@ -1,11 +1,19 @@
define(['browser', 'dom', 'layoutManager', 'shell', 'appRouter', 'apphost', 'css!./emby-button', 'registerElement'], function (browser, dom, layoutManager, shell, appRouter, appHost) {
'use strict';
import browser from 'browser';
import dom from 'dom';
import layoutManager from 'layoutManager';
import shell from 'shell';
import appRouter from 'appRouter';
import appHost from 'apphost';
import 'css!./emby-button';
import 'registerElement';
var EmbyButtonPrototype = Object.create(HTMLButtonElement.prototype);
var EmbyLinkButtonPrototype = Object.create(HTMLAnchorElement.prototype);
/* eslint-disable indent */
const EmbyButtonPrototype = Object.create(HTMLButtonElement.prototype);
const EmbyLinkButtonPrototype = Object.create(HTMLAnchorElement.prototype);
function onAnchorClick(e) {
var href = this.getAttribute('href') || '';
const href = this.getAttribute('href') || '';
if (href !== '#') {
if (this.getAttribute('target')) {
if (!appHost.supports('targetblank')) {
@ -66,5 +74,6 @@ define(['browser', 'dom', 'layoutManager', 'shell', 'appRouter', 'apphost', 'css
extends: 'a'
});
return EmbyButtonPrototype;
});
export default EmbyButtonPrototype;
/* eslint-enable indent */