How to use redom - 10 common examples

To help you get started, we’ve selected a few redom 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 bluenote10 / tabloo / src_frontend_old / plot.ts View on Github external
constructor(public store: StoreInterface) {
    this.el = el("div",
      this.dropdown = new Dropdown(),
      this.elPlot = el("div", {style: "width: 600px;height:400px;"})
    )

    this.chart = echarts.init(this.elPlot as HTMLDivElement);

    this.fetchData();
    this.dropdown.update(["A", "B", "C"])
  }
github Vincit / wordpress-theme-base / src / js / lib / svg.js View on Github external
const loadSVG = (path) => {
  const placeholder = el('.svg-placeholder');

  req(path)
    .then((r) => r.text())
    .then((svg) => {
      placeholder.parentNode.insertAdjacentHTML('afterbegin', svg);
      placeholder.parentNode.removeChild(placeholder);
    })
    .catch((err) => {
      console.error(err);
    });

  return placeholder;
};
github bluenote10 / tabloo / src_frontend_old / tabs.ts View on Github external
content.map((tab, i) =>
            this.headerChildren[i] = el("li",
              el("a",
                {onclick: (event: Event) => this.setActive(i)},
                el("span", tab.name)
              )
            )
          )
github buttercup / buttercup-browser-extension / source / tab / SavePrompt.js View on Github external
function createPrompt(prompt) {
    let title = el(
        "span",
        {
            style: {
                fontSize: "16px",
                fontFamily: "Buttercup-OpenSans",
                color: "#FFF",
                lineHeight: "normal",
                fontWeight: "normal",
                "-webkit-font-smoothing": "auto",
                fontSmooth: "auto"
            }
        },
        "Save new credentials?"
    );
    prompt._yesButton = el(
        "button",
github buttercup / buttercup-browser-extension / source / tab / Popup.js View on Github external
{
                    style: {
                        cursor: "pointer",
                        backgroundImage: `url(${ICON_KEY})`,
                        backgroundSize: "20px",
                        backgroundPosition: "5px 2px",
                        backgroundRepeat: "no-repeat",
                        backgroundColor: "rgba(0, 0, 0, 0.0)",
                        height: `${LIST_ITEM_HEIGHT}px`,
                        margin: "0",
                        overflow: "hidden",
                        position: "relative",
                        width: "100%"
                    }
                },
                el(
                    "span",
                    {
                        style: {
                            color: "#FFF",
                            fontFamily: "Buttercup-OpenSans",
                            position: "absolute",
                            left: "30px",
                            top: "2px",
                            lineHeight: "19px",
                            fontSize: "18px",
                            fontStyle: "normal"
                        }
                    },
                    item.title
                ),
                createPathElement(item.archiveName, item.entryPath, {
github buttercup / buttercup-browser-extension / source / tab / Popup.js View on Github external
style: {
                backgroundImage: `url(${ICON_SEARCHBAR})`,
                backgroundSize: `${ICON_SEARCH_IMAGE_SIZE}px`,
                backgroundPosition: "5px 3px",
                backgroundRepeat: "no-repeat",
                width: "100%",
                height: `${BUTTON_SIZE}px`,
                position: "absolute",
                left: "0px",
                top: `${BUTTON_SIZE}px`,
                borderBottom: "1px solid rgba(0, 0, 0, 0.2)"
            }
        },
        searchInput
    );
    const title = el(
        "div",
        {
            "data-buttercup-role": "title",
            style: {
                fontFamily: "Buttercup-OpenSans",
                color: config.BUTTERCUP_GREEN,
                fontSize: "19px",
                position: "absolute",
                left: "5px",
                top: "2px"
            }
        },
        "Buttercup"
    );
    const container = el(
        "div",
github bluenote10 / tabloo / src_frontend_old / tabs.ts View on Github external
content.map((tab, i) =>
            this.headerChildren[i] = el("li",
              el("a",
                {onclick: (event: Event) => this.setActive(i)},
                el("span", tab.name)
              )
            )
          )
github bluenote10 / tabloo / src_frontend_old / table.ts View on Github external
constructor () {
    this.el = el('th',
      this.node = text(""),
      this.sortButton = el("a"),
    );
  }
github bluenote10 / tabloo / src_frontend_old / tabs.ts View on Github external
constructor(name: string, onclick: () => void) {
    this.el = el("li",
      el("a",
        el("span", name)
      )
    )
  }
  update(isActive: boolean) {
github krausest / js-framework-benchmark / redom-v3.7.0-non-keyed / src / app.js View on Github external
constructor ({ app, store }) {
    this.app = app;
    this.store = store;
    this.el = el('tr',
      this.id = el('td.col-md-1'),
      el('td.col-md-4',
        this.label = el('a', { onclick: e => app.select(this.data.id) })
      ),
      el('td.col-md-1',
        this.remove = el('a', { onclick: e => app.remove(this.data.id) },
          el('span.glyphicon.glyphicon-remove', { 'aria-hidden': true })
        )
      ),
      el('td.col-md-6')
    );
  }
  update (data) {

redom

Tiny turboboosted JavaScript library for creating user interfaces.

MIT
Latest version published 6 months ago

Package Health Score

76 / 100
Full package analysis

Popular redom functions