@aurelia-mdc-web/switch
Version:
Wrapper for Material Components Web Switch
32 lines • 1.32 kB
JavaScript
define(["require", "exports", "tslib", "aurelia-framework"], function (require, exports, tslib_1, aurelia_framework_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EnhanceMdcSwitch = void 0;
var EnhanceMdcSwitch = /** @class */ (function () {
function EnhanceMdcSwitch() {
}
EnhanceMdcSwitch.prototype.beforeCompile = function (template) {
var e_1, _a;
var actions = template.querySelectorAll('[mdc-switch]');
try {
for (var _b = tslib_1.__values(Array.from(actions)), _c = _b.next(); !_c.done; _c = _b.next()) {
var i = _c.value;
i.setAttribute('as-element', 'mdc-switch');
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
};
EnhanceMdcSwitch = tslib_1.__decorate([
aurelia_framework_1.viewEngineHooks
], EnhanceMdcSwitch);
return EnhanceMdcSwitch;
}());
exports.EnhanceMdcSwitch = EnhanceMdcSwitch;
});
//# sourceMappingURL=enhance-mdc-switch.js.map