1

I'm having an IFrameElement on my page and I'd like to access it's nodes.

However, this sample:

frame.onLoad.listen((Event t) {
  print(frame.nodes.length);
});

returned 0;

That's obvious, because the IFrameElement doesn't have any direct nodes, but I had to try.

Vilda
  • 1,593
  • 1
  • 18
  • 42

1 Answers1

2

As far as I know this is not allowed in Dart due to security concerns. You can only communicate with code run inside the IFrame using postMessage() or use dart-js-interop and code like shown here Javascript - Get element from within an iFrame

Community
  • 1
  • 1
Günter Zöchbauer
  • 558,509
  • 191
  • 1,911
  • 1,506