1
0
Fork 0

Merge pull request #2489 from BenJamesBen/snippet-attr-webpage-fix

Fix Snippet.attr() webpage URLs.
This commit is contained in:
Joost De Cock 2022-07-28 13:03:26 +02:00 committed by GitHub
commit 5cdf4d8f60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,10 +10,10 @@ Snippet snippet.attr(
) )
``` ```
This `Snippet.attr()` method calls [`Attributes.add()`](./attributes#add) under the hood, This `Snippet.attr()` method calls [`Attributes.add()`](/reference/api/attributes/add) under the hood,
but returns the Snippet object. This allows you to chain different calls together. but returns the Snippet object. This allows you to chain different calls together.
If the third parameter is set to `true` it will call [`Attributes.set()`](./attributes#set) instead, If the third parameter is set to `true` it will call [`Attributes.set()`](/reference/api/attributes/set) instead,
thereby overwriting the value of the attribute. thereby overwriting the value of the attribute.
<Example part="snippet_attr"> <Example part="snippet_attr">