1
0
Fork 0
freesewing/markdown/dev/reference/api/attributes/get/en.md
2021-10-17 17:34:55 +02:00

459 B


title: get()

string attributes.get(string key)

Will return the value of attribute stored under key, or false if it's not set.

If key has multiple values, they will be joined together in a string, seperated by spaces.

let { Path, paths } = part.shorthand();

paths.demo = new Path()
  .attr('class', 'classA')
  .attr('class', 'classB');

let class = paths.demo.attributes.get('class'); 
// class now holds: "classA classB"