I'm creating a custom node that reads a list of effect values values dynamically from a remote server and populates a dropdown for its edit page. I've got the dropdown populating just fine, and the resulting selected effect makes its way to my code at node execution time just fine as well.
Where I'm struggling is setting the value of the dropdown when the edit page opens to the last value selected by the user. The only reference I can find to how to do this is an old message from 2017 on StackOverflow. Unfortunately when I simply try and use this.effect in code it's always undefined. Debugging a bit shows that this is always the overall window object, not my node object.
Agreed. My problem is with this in your example, which doesn't seem to work for me:
When I do that and dump it via console.log() it's the entire Window object. Attempting to directly access the value with node.effect returns undefined.