UNPKG

litespeed.js

Version:

Lite & fast micro javascript framework that is easy to learn

63 lines (47 loc) 1.94 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Litespeed.js</title> <link rel="icon" type="image/png" href="/favicon.png"> <link href="/styles/default.css" rel="stylesheet" /> <link href="/styles/androidstudio.css" rel="stylesheet" /> <meta name="description" content="Sample Litespeed.js application"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5" /> <style> body { padding: 50px; } [data-ls-placeholder] { background: red; } </style> </head> <body> <!-- <h1 data-ls-bind="{{tasks.title}}">Memory Leaks</h1> --> <h1 id="test">Memory Leaks</h1> <script> (function (window) { "use strict"; document.addEventListener("DOMContentLoaded", function() { let count = 0; let offest = 10000; function setTitle() { console.log('Title ' + count); // let temp = window.ls.container.get('tasks'); let elm = document.getElementById('test'); for (let index = count; index < count + offest; index++) { elm.textContent = 'New title #'+index; } count += offest; } setTitle(); setInterval(function () { setTitle(); }, 20000); window.ls.run(window); }); }(window)); </script> </body> </html>