I don't know how to run my Drupal.behaviours.mybehaviour on every page load.
Here's my code example that run only once, when I load the page is no longer run my code, how can I change that from once to run on every page load:
Drupal.behaviors.searchFilter = {
attach: function (context) {
once('searchFilter', 'html', context).forEach( function () {
console.log("function run");
});
}
}
Drupal.behaviors.searchFilter = { attach: function (context) {console.log("test loading page");}};
Drupal.beviours
is already called on every page load. So I don't know how to answer your question.