How to use the riot.mount function in riot

To help you get started, we’ve selected a few riot 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 eden-js / cli / bin / bundles / riot / resources / js / bootstrap.js View on Github external
initialize () {
        // mount bar
        this._bar = new bar ();

        // mount riot tag
        this._mount = riot.mount (document.querySelector ('body').children[0], window.edenState)[0];
    }
github marcbachmann / limelight / client / search / index.js View on Github external
})

  // Capture drop event
  document.addEventListener('drop', function (evt) {
    evt.preventDefault()
  })

  // Disable Pinch Zoom
  document.addEventListener('mousewheel', function (evt) {
    if (evt.ctrlKey) {
      evt.preventDefault()
    }
  })

  tags.search = riot.mount('.search', 'search')
  riot.mount('.list', 'list')
  riot.mount('.view', 'view')
})
github denizdogan / chrome-extension-temporary-email / src / options / script.js View on Github external
}]
}]

import providers from '../js/providers'

// push the options of all providers to the view model
providers.forEach((p) => {
  sections.push({
    title: p.config.title,
    icon: 'bookmark',
    options: p.options
  })
})

// mount the application
riot.mount('*', { sections: sections })
github marcbachmann / limelight / client / search / index.js View on Github external
}
  })

  // Capture drop event
  document.addEventListener('drop', function (evt) {
    evt.preventDefault()
  })

  // Disable Pinch Zoom
  document.addEventListener('mousewheel', function (evt) {
    if (evt.ctrlKey) {
      evt.preventDefault()
    }
  })

  tags.search = riot.mount('.search', 'search')
  riot.mount('.list', 'list')
  riot.mount('.view', 'view')
})
github riot / animore / test / core.specs.js View on Github external
it('list items can properly handle update animations', (done) => {
    riot.tag('list', '<ul><li data-is="animore"></li></ul>', function() {
      this.items = [1, 2, 3]
    })
    let callCount = 0
    const tag = riot.mount(createWrapper(), 'list', {
      update: {
        duration: 200,
        complete() {
          callCount ++
          if (callCount === 3) done()
        }
      }
    })[0]

    tag.items.reverse()
    tag.update()
    tag.unmount()
  })
})
github marcbachmann / limelight / client / configuration / index.js View on Github external
client.on('dom-ready', function () {
  riot.mount('*')
  riot.route.start()
  riot.route('plugins')
})
github elbywan / bosket / docs / riot / index.js View on Github external
window.onload = () => {
    riot.mount("*")
}
github ctx-core / ctx-core / dom / api.js View on Github external
export function mount() {
  log(`${logPrefix}|mount`)
  const mount$ctx = assign(...arguments)
      , {mount} = mount$ctx
  let {ctx} = mount$ctx
  window.ctx = ctx
  $ctx.assign__ctx(ctx)
  const riot$route$base =
          ctx.route$base
          || mount$ctx.route$base
          || '#'
  assign__route$base(ctx, riot$route$base)
  for (let i=0; i &lt; mount.length; i++) {
    const mount$ = mount[i]
    riot.mount(mount$, {ctx})
  }
  return ctx
}
export function assign__ctx(ctx) {
github andrewdelprete / boilerplates / riotjs-gulp-browserify-es6-boilerplate / src / scripts / app.js View on Github external
home: (id, action) => {
        var currentPage = Riot.mount('#view', 'people-index', { people: params.people });
    },
    people: function(id, action) {
github cam-inc / viron / src / components / viron-popover / spread / index.js View on Github external
this.on('mount', () => {
    tag = riot.mount(this.refs.content, this.opts.tagname, ObjectAssign({
      isPopover: true,
      popoverCloser: fadeOut
    }, this.opts.tagopts))[0];
    fadeIn();
    window.addEventListener('keydown', this.handleKeyDown);
    window.addEventListener('resize', this.handleWindowResize);
  }).on('before-unmount', () => {
    tag.unmount(true);