Get started with le_js CDN

MIT licensed

Le_JS is a lightweight library for handling DOM manipulation and event listeners.

Tags:
  • Logentries
  • logging
  • Cross-browser

Stable version

Copied!

How to start using le_js CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with le_js CDN - cdnhub.io</title>
  <script src="https://cdn.cdnhub.io/le_js/0.0.3/le.min.js"></script>
  <style>
    #output { width: 300px; height: 300px; border: 1px solid black; }
  </style>
</head>
<body>
  <button id="explore">Explore</button>
  <div id="output"></div>

  <script>
    const le = new LE();
    const output = document.getElementById('output');

    document.getElementById('explore').addEventListener('click', () => {
      le.api('https://jsonplaceholder.typicode.com/todos/1', (err, data) => {
        if (err) {
          console.error('Error:', err);
        } else {
          output.innerHTML = JSON.stringify(data, null, 2);
        }
      });
    });
  </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!

All versions