Skip to content

Commit 9f870cf

Browse files
committed
Update client-scripting-best-practices.md
1 parent b36743c commit 9f870cf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

powerapps-docs/developer/model-driven-apps/clientapi/client-scripting-best-practices.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Best practices: Client scripting in model-driven apps| MicrosoftDocs"
3-
ms.date: 10/31/2018
3+
ms.date: 10/19/2020
44
ms.service: powerapps
55
ms.topic: "article"
66
applies_to:
@@ -30,7 +30,7 @@ When you write functions that will be used in JavaScript libraries, your functio
3030
// Code to perform your action.
3131
}
3232
```
33-
- **Namespaced library names**: Associate each of your functions with a JavaScript object to create a kind of namespace to use when you call your functions as shown in the following example.
33+
- **Namespaced library names**: As a best practice, you should always create namespaced JavaScript libraries to avoid having your functions overridden by functions in another library. More information: [Write you first JavaScript](walkthrough-write-your-first-client-script.md)
3434
```JavaScript
3535
var Sdk = window.Sdk || {};
3636
(function () {
@@ -52,7 +52,6 @@ When you write functions that will be used in JavaScript libraries, your functio
5252
Sdk.attributeOnChange();
5353
```
5454

55-
If you call a function within another function, you can use this keyword as a shortcut to the object that contains both functions. However, if your function is being used as an event handler, this keyword will refer to the object that the event is occurring on.
5655

5756
## Avoid using unsupported methods
5857

0 commit comments

Comments
 (0)