# webln.isEnabled()

`webln.isEnabled()` allows you to check if webln is enabled without explicitly enabling it through `webln.enable()` (which may cause a confirmation popup in some providers)

{% hint style="warning" %}
This API may not be available on all [providers](https://www.webln.guide/ressources/webln-providers).&#x20;
{% endhint %}

#### Method&#x20;

```typescript
function isEnabled(): Promise<boolean>;
```

**Example**

```javascript
if(typeof window.webln !== 'undefined' && window.webln.isEnabled) {
    const isEnabled = await window.webln.isEnabled();
    // do something with the value
    console.log(isEnabled)
  }
```

#### Demo

{% embed url="<https://codepen.io/getalby/pen/vYvqZgy>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.webln.guide/building-lightning-apps/webln-reference/webln.isenabled.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
