Comparing version 1.1.6 to 1.1.61
@@ -12,3 +12,3 @@ 'use strict'; | ||
window.addEventListener('DOMContentLoaded', function () { | ||
document.body.innerHTML = components; | ||
document.querySelector('#' + documentNode).innerHTML = rootComponent; | ||
}); | ||
@@ -15,0 +15,0 @@ } |
{ | ||
"name": "literaljs", | ||
"version": "1.1.6", | ||
"version": "1.1.61", | ||
"description": "Lightweight components using template literals.", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -19,5 +19,5 @@ # LiteralJS | ||
`<div> | ||
This should render like React. | ||
This should render. | ||
<p>Isn't this lovely?</p> | ||
${otherComponent} | ||
${secondComponent} | ||
</div>` | ||
@@ -32,3 +32,3 @@ ); | ||
Literal.Render(firstComponent); | ||
Literal.Render(firstComponent, 'app'); | ||
</script> | ||
@@ -43,3 +43,3 @@ </body> | ||
``` | ||
```js | ||
Literal.Component( | ||
@@ -57,8 +57,8 @@ `<p class="corn"> | ||
``` | ||
```js | ||
var firstComponent = Literal.Component( | ||
`<div> | ||
This should render like React. | ||
<p>Isn't this lovely?</p> | ||
${secondComponent} | ||
This should render like React. | ||
<p>Isn't this lovely?</p> | ||
${secondComponent} | ||
</div>` | ||
@@ -76,6 +76,6 @@ ); | ||
```js | ||
Literal.Render(RootComponent, 'app'); | ||
``` | ||
Literal.Render(MainComponent); | ||
``` | ||
The Render method takes the main parent component of your app. | ||
The Render method takes the main parent component of your app and `id` of DOM node you want to attach the markup to. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60669