<commit_before># Stateless JavaScript utils

TL/DR: a toolbox with JavaScript sprinkles that I found handy during the years. They
should work great without attaching event handlers to elements on initialization,
since I like making apps that update the DOM with HTML from AJAX responses.

Utils:
- [element scroll listening](./element-scrolling)

## Reason for this toolbox

So I have made quite a few Rails apps over the last years, and I like Rails. And I like
"server rendered HTML" in opposition to client side MVC. Why? Usually because I
feel that we have to create two webapps instead of one when using client side MVC.
Two apps is usually more work and more code than one app.

So what is not uncommon in Rails is using Turbolinks or replacing parts of the
DOM with javascript-responses like

```js
$('.my-element').replaceWith('<%= j render @my_element %>');
```<commit_msg>Some wants for the util list<commit_after># Stateless JavaScript utils

TL/DR: a toolbox with JavaScript sprinkles that I found handy during the years. They
should work great without attaching event handlers to elements on initialization,
since I like making apps that update the DOM with HTML from AJAX responses.

Utils:
- [element scroll listening](./element-scrolling)
- drag and drop (not implemented yet)
- file drag (not implemented yet)

## Reason for this toolbox

So I have made quite a few Rails apps over the last years, and I like Rails. And I like
"server rendered HTML" in opposition to client side MVC. Why? Usually because I
feel that we have to create two webapps instead of one when using client side MVC.
Two apps is usually more work and more code than one app.

So what is not uncommon in Rails is using Turbolinks or replacing parts of the
DOM with javascript-responses like

```js
$('.my-element').replaceWith('<%= j render @my_element %>');
```
{'fraction_non_alphanumeric': 0.06158833063209076, 'fraction_numerical': 0.0, 'mean_word_length': 4.431085043988269, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6104711', 'n_tokens_mistral': 495, 'n_tokens_neox': 462, 'n_words': 288}