Skip to content

Commit

Permalink
Update documentation for set-property command
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Mar 31, 2024
1 parent 978d28f commit 087edf0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion goml-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -1591,12 +1591,15 @@ set-local-storage: {"key": null}
```
set-property: ("details", {"open": "false"})
// Same but with a XPath:
set-property: ("//details", {"attribute-name": "attribute-value"})
set-property: ("//details", {"property-name": "property-value"})
// Setting multiple properties at once:
set-property: ("details", {"open": "false", "another": "x"})
// Same but with a XPath:
set-property: ("//details", {"open": "false", "another": "x"})
// It works with object-path as well:
set-property: ("details", {"a"."b": "false"})
```

To remove a property, you can use the `null` ident. Please note that the properties set by the browser will only be reset.
Expand Down

0 comments on commit 087edf0

Please sign in to comment.