crossOrigin method

Img crossOrigin(
  1. String mode, {
  2. bool? removeIf,
})

Indicates if the fetching of the image must be done using a CORS request. Read more...

Implementation

Img crossOrigin(String mode, {bool? removeIf}) {
  if (removeIf != true && node.attrs != null) {
    VirtualAttr attr = VirtualAttr('crossorigin', mode);
    node.attrs!.add(attr);
  }
  return this;
}