# Update custom node documentation and the low-case example node to reduce Editor namespace clashes

**URL:** https://discourse.nodered.org/t/update-custom-node-documentation-and-the-low-case-example-node-to-reduce-editor-namespace-clashes/101362
**Category:** Feature Requests
**Created:** [26 June 2026 12:04 UTC](https://discourse.nodered.org/t/update-custom-node-documentation-and-the-low-case-example-node-to-reduce-editor-namespace-clashes/101362 "2026-06-26T12:04:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [26 June 2026 12:04 UTC](https://discourse.nodered.org/t/update-custom-node-documentation-and-the-low-case-example-node-to-reduce-editor-namespace-clashes/101362/1 "2026-06-26T12:04:24Z")

</div>

As seen in a recent Node-RED issue where the "bug" was actually in a custom node (now fixed). It is all too easy for node authors to break parts of Node-RED.

One small but useful way to help mitigate this is for Editor javascript to be wrapped in an IIFE:

```javascript
(function () {
    'use strict'

    // .... "global" code here ....

    RED.nodes.registerType(moduleName, { /* .... */ });
}());

```

This immediately prevents leakage of "global" definitions from impacting Node-RED itself and does not seem to have any negative impacts (I've been using this in my own nodes for many years now).

I think it would be a useful tweak to use this pattern in documentation and in the lowercase example node.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [26 June 2026 12:18 UTC](https://discourse.nodered.org/t/update-custom-node-documentation-and-the-low-case-example-node-to-reduce-editor-namespace-clashes/101362/2 "2026-06-26T12:18:36Z")

</div>

If anyone wants to PR doc updates based on this request, that would always be welcome.

> **[node-red.github.io/docs/creating-nodes at main · node-red/node-red.github.io](https://github.com/node-red/node-red.github.io/tree/main/docs/creating-nodes)**
>
> Node-RED Site. Contribute to node-red/node-red.github.io development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [26 June 2026 13:19 UTC](https://discourse.nodered.org/t/update-custom-node-documentation-and-the-low-case-example-node-to-reduce-editor-namespace-clashes/101362/3 "2026-06-26T13:19:44Z")

</div>

> [@knolleary](#):
>
> If anyone wants to PR doc updates based on this request, that would always be welcome.
> 
> [node-red.github.io/docs/creating-nodes at main · node-red/node-red.github.io · GitHub](https://github.com/node-red/node-red.github.io/tree/main/docs/creating-nodes)

Done.

> <https://github.com/node-red/node-red.github.io/pull/424>
>
> As suggested in https://discourse.nodered.org/t/update-custom-node-documentation…-and-the-low-case-example-node-to-reduce-editor-namespace-clashes/101362

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [25 August 2026 13:20 UTC](https://discourse.nodered.org/t/update-custom-node-documentation-and-the-low-case-example-node-to-reduce-editor-namespace-clashes/101362/4 "2026-08-25T13:20:31Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
