Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
initialize () {
// mount bar
this._bar = new bar ();
// mount riot tag
this._mount = riot.mount (document.querySelector ('body').children[0], window.edenState)[0];
}
})
// 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')
})
}]
}]
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 })
}
})
// 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')
})
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()
})
})
client.on('dom-ready', function () {
riot.mount('*')
riot.route.start()
riot.route('plugins')
})
window.onload = () => {
riot.mount("*")
}
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 < mount.length; i++) {
const mount$ = mount[i]
riot.mount(mount$, {ctx})
}
return ctx
}
export function assign__ctx(ctx) {
home: (id, action) => {
var currentPage = Riot.mount('#view', 'people-index', { people: params.people });
},
people: function(id, action) {
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);