---
id: fast-element.attachedbehaviorhtmldirective.createbehavior
title: AttachedBehaviorHTMLDirective.createBehavior() method
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-element](./fast-element.md) &gt; [AttachedBehaviorHTMLDirective](./fast-element.attachedbehaviorhtmldirective.md) &gt; [createBehavior](./fast-element.attachedbehaviorhtmldirective.createbehavior.md)

## AttachedBehaviorHTMLDirective.createBehavior() method

Creates a behavior for the provided target node.

<b>Signature:</b>

```typescript
createBehavior(target: Node): Behavior;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  target | Node | The node instance to create the behavior for. |

<b>Returns:</b>

[Behavior](./fast-element.behavior.md)

## Remarks

Creates an instance of the `behavior` type this directive was constructed with and passes the target and options to that `behavior`<!-- -->'s constructor.
