Skip to content

Wrapping An Instance

madprops edited this page Aug 9, 2017 · 8 revisions

Simple example #1

var msg = Msg();

function show_modal(html)
{
	msg.set_or_show(html);
}

show_modal("Hello");

Simple example #2

function fadeless_modal()
{
	return Msg(
	{
		persistent: false, // This makes it destroy the html elements on close
		fade_in: false,
		fade_out: false
	});
}

fadeless_modal().show("Hello");
Clone this wiki locally