Doc improvements are always welcome. However, I'm not sure that you're using compilers the way they were intended.
Having no experience with the DataTable plugin or your particular app, I assume that your code looked like the snippet below pre-Unpoly, when you were making full page loads. After every record list there was an inline-script tags initializing the DataTable plugin with options specific to the record type ("users", "documents"). A shortened example:
<!-- users.html -->
<div class="users_list">
...
</div>
<script>
$('.users_list').DataTable({
...,
ajax: { url: "/api/lc/users" },
})
</script>
<!-- documents.html -->
<div class="documents_list">
...
</div>
<script>
$('.documents_list').DataTable({
...,
ajax: { url: "/api/lc/documents" },
})
</script>
When you migrated to Unpoly you expected the following to work:
<!-- users.html -->
<div class="users_list">
...
</div>
<script>
up.$compiler('.users_list'), function($element) {
$element.DataTable({
...,
ajax: { url: "/api/lc/users" },
})
)
</script>
<!-- documents.html -->
<div class="documents_list">
...
</div>
<script>
up.$compiler('.documents_list'), function($element) {
$element.DataTable({
...,
ajax: { url: "/api/lc/documents" },
})
)
</script>
However, compilers are not meant to "run JavaScript now". They are meant to run JavaScript whenever an element matching .users_list or .documents_list enters the DOM in the future.
If the code above would work, we would register the same compilers again and again as users navigate back and forth using [up-follow] links. Eventually we would initialize the DataTable plugin many times for each .users_list and .documents_list element that enters the DOM via a fragment updates.
Preventing duplicate compiler registrations were one of the motivations to not evaluate script tags in new fragments.
The canonical way to implement this would be to have no <script> tags at all to activate a data table, neither inline nor external. Instead we would only render the record list with type specific parameters in an [up-data] attribute:
<!-- users.html -->
<div class='list' up-data='{ "model_name": "users" }'>
...
</div>
<!-- documents.html -->
<div class='list' up-data='{ "model_name": "documents" }'>
...
</div>
We then have a single compiler, loaded once in the document <head> that initializes the DataTable plugin. The type-specific options from the [up-data] attribute are automatically passed as a second compiler argument:
<!-- scripts.js -->
up.$compiler('.list', function($element, data) {
$element.DataTable({
...,
ajax: { url: "/api/lc/" + data.model_name },
})
})