Skip to content

Commit 2089454

Browse files
committed
chore: add comment on getParent
1 parent a8536eb commit 2089454

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/entity.js

+3
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ export default class Entity {
176176
return await engine.interpret(this)
177177
}
178178

179+
/* Note: I don't this getParent() is needed,
180+
since el. variables should use the current element's uuid instead. */
179181
getParent() {
180182
if (this.isParent()) {
181183
return this
@@ -194,6 +196,7 @@ export default class Entity {
194196
}
195197

196198
generateEntityUUID() {
199+
// Suggestion: we can use crypto.randomUUID(). Tho crypto only works in secure contexts
197200
return 'Entity' + Date.now() + Math.floor(Math.random() * 10000)
198201
}
199202

0 commit comments

Comments
 (0)