How to use the marko/runtime/html/helpers.a function in marko

To help you get started, we’ve selected a few marko examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github marko-js / marko / test / autotests / components-compilation / component-inline-module-exports / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_components = require("marko/components"),
    marko_registerComponent = marko_components.rw,
    marko_componentType = marko_registerComponent("/marko-test$1.0.0/autotests/components-compilation/component-inline-module-exports/index.marko", function() {
      return module.exports;
    }),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_attr = marko_helpers.a;

var marko_component = {};

function render(input, out, component, state) {
  var data = input;

  out.w("");
}

marko_template._ = marko_components.r(render, {
    type: marko_componentType
  }, marko_component);

marko_template.Component = marko_components.w(marko_component, marko_template._);
github marko-js / marko / test / autotests / components-compilation-deprecated / component-inline-multiple-roots / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_components = require("marko/components"),
    marko_registerComponent = marko_components.rw,
    marko_componentType = marko_registerComponent("/marko-test$1.0.0/autotests/components-compilation-deprecated/component-inline-multiple-roots/index.marko", function() {
      return module.exports;
    }),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_attr = marko_helpers.a;

var marko_component = {};

function render(input, out, component, state) {
  var data = input;

  out.w("AB");
}

marko_template._ = marko_components.r(render, {
    type: marko_componentType,
    roots: [
github marko-js / marko / test / autotests / widgets-compilation / macro-widget / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_widgets = require("marko/widgets"),
    marko_registerWidget = marko_widgets.rw,
    marko_widgetType = marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation/macro-widget/index.marko", function() {
      return module.exports;
    }),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_escapeXml = marko_helpers.x,
    marko_attr = marko_helpers.a,
    marko_forEach = marko_helpers.f;

var marko_component = {};

function render(input, out, widget, state) {
  var data = input;

  function macro_renderButton(color, out, renderBody) {
    out.w("" +
      marko_escapeXml(color) +
      "");
  }
github marko-js / marko / test / autotests / widgets-compilation / component-template-non-index / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_widgets = require("marko/widgets"),
    marko_registerWidget = marko_widgets.rw,
    marko_widgetType = marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation/component-template-non-index/template.component", function() {
      return require("./template.component");
    }),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_attr = marko_helpers.a;

function render(input, out, widget, state) {
  var data = input;

  out.w("");
}

marko_template._ = marko_widgets.r(render, {
    type: marko_widgetType
  });

marko_template.meta = {
    deps: [
      "./template.style.css",
github marko-js / marko / test / autotests / widgets-compilation / ref / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_widgets = require("marko/widgets"),
    marko_registerWidget = marko_widgets.rw,
    marko_widgetType = marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation/ref/index.marko", function() {
      return module.exports;
    }),
    marko_loadTemplate = require("marko/runtime/helper-loadTemplate"),
    app_foo_template = marko_loadTemplate(require.resolve("./components/app-foo")),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_loadTag = marko_helpers.t,
    app_foo_tag = marko_loadTag(app_foo_template),
    marko_attr = marko_helpers.a;

var marko_component = {
    onMount: function () {
    }
};

function render(input, out, widget, state) {
  var data = input;

  out.w("<div class="\&quot;root\&quot;&quot;">");

  app_foo_tag({
      $w: [
        widget,</div>
github marko-js / marko / test / autotests / widgets-compilation / component-inline-class / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_component = {
        foo: function() {},
        bar: function() {}
      },
    marko_widgets = require("marko/widgets"),
    marko_registerWidget = marko_widgets.rw,
    marko_widgetType = marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation/component-inline-class/index.marko", function() {
      return module.exports;
    }),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_attr = marko_helpers.a;

function render(input, out, widget, state) {
  var data = input;

  out.w("");
}

marko_template._ = marko_widgets.r(render, {
    type: marko_widgetType
  }, marko_component);

marko_template.Widget = marko_widgets.w(marko_component, marko_template._);

marko_template.meta = {
github marko-js / marko / test / autotests / widgets-compilation-deprecated / component-inline-var-module-exports / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_component,
    marko_widgets = require("marko/widgets"),
    marko_registerWidget = marko_widgets.rw,
    marko_widgetType = marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation-deprecated/component-inline-var-module-exports/index.marko", function() {
      return module.exports;
    }),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_attr = marko_helpers.a;

var foo = marko_component = {};

function render(input, out, widget, state) {
  var data = input;

  out.w("");
}

marko_template._ = marko_widgets.r(render, {
    type: marko_widgetType
  }, marko_component);

marko_template.Widget = marko_widgets.w(marko_component, marko_template._);
github marko-js / marko / test / autotests / widgets-compilation-deprecated / component-template-entry-split / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_component = require("./renderer"),
    marko_widgets = require("marko/widgets/legacy"),
    marko_registerWidget = marko_widgets.rw,
    marko_widgetType = marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation-deprecated/component-template-entry-split/widget", function() {
      return require("./widget");
    }),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_attr = marko_helpers.a;

function render(input, out, widget, state) {
  out.w("");
}

marko_template._ = marko_widgets.r(render, {
    type: marko_widgetType
  }, marko_component);
github marko-js / marko / test / autotests / widgets-compilation-deprecated / component-inline-export-default / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_widgets = require("marko/widgets"),
    marko_registerWidget = marko_widgets.rw,
    marko_widgetType = marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation-deprecated/component-inline-export-default/index.marko", function() {
      return module.exports;
    }),
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_attr = marko_helpers.a;

var marko_component = {};

function render(input, out, widget, state) {
  var data = input;

  out.w("");
}

marko_template._ = marko_widgets.r(render, {
    type: marko_widgetType
  }, marko_component);

marko_template.Widget = marko_widgets.w(marko_component, marko_template._);
github marko-js / marko / test / autotests / widgets-compilation-deprecated / widget-types / expected.js View on Github external
var marko_template = module.exports = require("marko/html").t(__filename),
    marko_widgets = require("marko/widgets/legacy"),
    marko_registerWidget = marko_widgets.rw,
    marko_defineWidget = marko_widgets.w,
    marko_widgetTypes = {
        "default": marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation-deprecated/widget-types/widget", function() {
          return marko_defineWidget(require("./widget"));
        }),
        mobile: marko_registerWidget("/marko-test$1.0.0/autotests/widgets-compilation-deprecated/widget-types/widget-mobile", function() {
          return marko_defineWidget(require("./widget-mobile"));
        })
      },
    marko_helpers = require("marko/runtime/html/helpers"),
    marko_attr = marko_helpers.a;

function render(input, out, widget, state) {
  var data = input;

  widget.t(marko_widgetTypes[data.isMobile ? "default" : "mobile"]);

  out.w("");
}

marko_template._ = marko_widgets.r(render, {});

marko_template.meta = {};