copy(attributes)

Copies the Link and optionally changes some of the attributes of the new link.

Copy
externalLink = new Scrivito.Link({url: "https://scrivito.com"});
externalLink2 = externalLink.copy({target: '_blank'});
console.log(externalLink2.url());

Params

  • attributes (Object) - The attributes of the new Link.

Throws

  • ArgumentError - If invalid attributes have been provided.

Returns

A new Link.