Using latest marko 4 beta 8, I want to render a component that uses the await tag - purely in the browser. The component is built according to http://markojs.com/try-online/#Async_Await
Template should render asynchronously after 2,5 seconds.
Actual Behavior
Tab / Browser uses 99% of CPU, can only be killed by taskmanager. Smells like an infinite loop.
Possible Fix
instead of using replaceChildrenOf use appendTo
var template = require('./index.marko');
template.render({}, function(err, result) {
result.appendTo(document.getElementById('root'));
});
Additional Info
### Your Environment
* Version used: 4.0.0-beta.8
* Environment name and version (e.g. Chrome 39, node.js 5.4): Chrome Version 57.0.2972.0 (Offizieller Build) **canary** (64-Bit)
* Operating System and version (desktop or mobile): Desktop MBP 10.12.2 (Sierra)
* Link to your project: https://github.com/Primajin/markojs-4-clientside
### Steps to Reproduce
1. Check out my project
2. `npm install`
3. switch lines 4 and 6 in `src/index.js`
4. `npm run build`
5. open `index.html` in your browser
Bug Report
Context
Using latest marko 4 beta 8, I want to render a component that uses the await tag - purely in the browser. The component is built according to http://markojs.com/try-online/#Async_Await
while being required by a simple index page that collects all the components (currently just one)
which itself is injected via lasso
2.8.4
/ lasso-cli2.0.6
/ lasso-marko2.2.0
into a simpleindex.html
file.Checkout https://github.com/Primajin/markojs-4-clientside as a reference.
Expected Behavior
Template should render asynchronously after 2,5 seconds.
Actual Behavior
Tab / Browser uses 99% of CPU, can only be killed by taskmanager. Smells like an infinite loop.
Possible Fix
instead of using
replaceChildrenOf
useappendTo
Additional Info
### Your Environment * Version used: 4.0.0-beta.8 * Environment name and version (e.g. Chrome 39, node.js 5.4): Chrome Version 57.0.2972.0 (Offizieller Build) **canary** (64-Bit) * Operating System and version (desktop or mobile): Desktop MBP 10.12.2 (Sierra) * Link to your project: https://github.com/Primajin/markojs-4-clientside ### Steps to Reproduce 1. Check out my project 2. `npm install` 3. switch lines 4 and 6 in `src/index.js` 4. `npm run build` 5. open `index.html` in your browser