|
@@ -0,0 +1,15 @@
|
|
|
+Drupal.behaviors.boussole = {
|
|
|
+ attach: function (context, settings) {
|
|
|
+ console.log("Hello boussole", context);
|
|
|
+ // Use context to filter the DOM to only the elements of interest,
|
|
|
+ // and use once() to guarantee that our callback function processes
|
|
|
+ // any given element one time at most, regardless of how many times
|
|
|
+ // the behaviour itself is called (it is not sufficient in general
|
|
|
+ // to assume an element will only ever appear in a single context).
|
|
|
+ // once('boussoleForm', 'input.myCustomBehavior', context).forEach(
|
|
|
+ // function (element) {
|
|
|
+ // element.classList.add('processed');
|
|
|
+ // }
|
|
|
+ // );
|
|
|
+ }
|
|
|
+};
|