<?xml version="1.0" encoding="UTF-8" ?>
<dt-option library="Buttons">
	<name>buttons.buttons.namespace</name>
	<summary>Unique namespace for every button</summary>
	<since>1.0.0</since>

	<default type="null" value="null">
		Default value is automatically assigned by Buttons
	</default>

	<type type="string">
		<description>
			If given, this string should be unique for every button created on the page, with a leaving period (`.`). However, it is _strongly_ recommended that you _do not_ set this parameter - allow Buttons to assign a unique value.
		</description>
	</type>

	<description>
		It can often be useful for authors to be able to add events to a button or DataTable when using the `b-init buttons.buttons.init` option to take some action when a trigger is activated on the page. In order to be able to cleanly remove the attached events and prevent possible memory leaks form these event listeners, Buttons will automatically generate a namespace string for each button. The `b-init buttons.buttons.destroy` option can be used to define a function that will remove the event listeners added.

		It is possible to define your own namepsace, however it is **strongly** recommended that you _do not_ provide a custom value, instead allowing Buttons to assign its own value. There is no benefit in assigning your own namespace!

		This parameter is documented primarily so you know that it exists and is automatically generated by Buttons.
	</description>

	<example title="Button which has mouse enter / leave (hover) event listeners"><![CDATA[

$('#myTable').DataTable( {
	buttons: {
		buttons: [
			{
				text: '',
				init: function ( e, dt, node, config ) {
					node.on( 'mouseenter'+config.namespace, function () {
						console.log( 'Mouse enter' );
					} );

					node.on( 'mouseleave'+config.namespace, function () {
						console.log( 'Mouse leave' );
					} );
				},
				destroy: function ( dt, node, config ) {
					node.off( 'mouseenter'+config.namespace );
					node.off( 'mouseleave'+config.namespace );
				}
			}
		]
	}
} );

]]></example>
</dt-option>