nonce method

WidgetElement nonce(
  1. String crypto, {
  2. bool? removeIf,
})
inherited

The nonce global attribute defining a cryptographic nonce ("number used once") which can be used by Content Security Policy to determine whether or not a given fetch will be allowed to proceed for a given element. Read more...

Implementation

WidgetElement nonce(String crypto, {bool? removeIf}) {
  if (removeIf != true && node.attrs != null) {
    VirtualAttr attr = VirtualAttr('nonce', crypto);
    node.attrs!.add(attr);
  }
  return this;
}