mirror of
https://github.com/phfroidmont/scalive.git
synced 2025-12-25 05:26:59 +01:00
Setup example module with JS bundle configured
This commit is contained in:
parent
486e89c1f1
commit
aae3db841b
7 changed files with 39 additions and 7 deletions
11
core/js/src/index.ts
Normal file
11
core/js/src/index.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import morphdom from 'morphdom';
|
||||
|
||||
var el1 = document.createElement('div');
|
||||
el1.className = 'foo';
|
||||
|
||||
var el2 = document.createElement('div');
|
||||
el2.className = 'bar';
|
||||
|
||||
morphdom(el1, el2);
|
||||
|
||||
export const scalive = "scalive"
|
||||
|
|
@ -3,6 +3,9 @@ import scalive.defs.complex.ComplexHtmlKeys
|
|||
import scalive.defs.tags.HtmlTags
|
||||
|
||||
package object scalive extends HtmlTags with HtmlAttrs with ComplexHtmlKeys:
|
||||
|
||||
lazy val defer = htmlAttr("defer", codecs.BooleanAsOnOffStringCodec)
|
||||
|
||||
implicit def stringToMod(v: String): Mod = Mod.Content.Text(v)
|
||||
implicit def htmlElementToMod(el: HtmlElement): Mod = Mod.Content.Tag(el)
|
||||
implicit def dynStringToMod(d: Dyn[String]): Mod = Mod.Content.DynText(d)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue