getSandbox method

Set<Sandbox> getSandbox()

Implementation

Set<Sandbox> getSandbox() {
  var sandbox = iframe.sandbox;
  Set<Sandbox> values = Set();
  for (int i = 0; i < sandbox.length; i++) {
    var token = Sandbox.fromNativeValue(sandbox.item(i));
    if (token != null) {
      values.add(token);
    }
  }
  return values.isEmpty ? Set.from(Sandbox.values) : values;
}