However, since the field is set "externally" in the current exploreDirectory algorithm, I think it would still make sense to adjust the data structure here to make it "less mutable" if not immutable if possible. If I see it correctly, one way to achieve this in WebIDL could be defining a second constructor with a mandatory URL parameter. Maybe this something we could discuss in today's call.
This PR takes over the commit discussed under https://github.com/w3c/wot-scripting-api/pull/551#discussion_r1632756745. However, I already adjusted it insofar that I removed the adjustments of the constructor, not adding an optional
url
parameter.However, since the field is set "externally" in the current
exploreDirectory
algorithm, I think it would still make sense to adjust the data structure here to make it "less mutable" if not immutable if possible. If I see it correctly, one way to achieve this in WebIDL could be defining a second constructor with a mandatory URL parameter. Maybe this something we could discuss in today's call.Preview | Diff