UNPKG

@nent/core

Version:

Functional elements to add routing, data-binding, dynamic HTML, declarative actions, audio, video, and so much more. Supercharge static HTML files into web apps without script or builds.

46 lines (41 loc) 1.1 kB
/*! * NENT 2022 */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const index = require('./index-1829aebc.js'); const service = require('./service-18bf7431.js'); require('./index-637e8c28.js'); require('./logging-37c154cf.js'); require('./state-f97ff0e6.js'); require('./index-96f3ab3f.js'); const Action = class { constructor(hostRef) { index.registerInstance(this, hostRef); this.valid = true; this.actionService = new service.ActionService(this, 'n-action'); } /** * Get the underlying actionEvent instance. Used by the n-action-activator element. */ getAction() { return this.actionService.getAction(); } /** * Send this action to the action messaging system. */ sendAction(data) { return this.actionService.sendAction(data); } get childScript() { return this.el.querySelector('script'); } get childInputs() { return this.el.querySelectorAll('input,select,textarea'); } render() { return index.h(index.Host, null); } get el() { return index.getElement(this); } }; exports.n_action = Action;