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,675
  • 1
  • 20
  • 50

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
  • 623,577
  • 216
  • 2,003
  • 1,567