final html.IFrameElement iframe = rootDemoElement.querySelector("iframe");
final int contentHeight = <???>.scrollHeight;
这在 JS 中有效:
var contentHeight = iframe.contentDocument.documentElement.scrollHeight;
Dart 中不提供 contentDocument。
Dart 中真的可能缺少 contentDocument 吗?
最佳答案
这是我的解决方案:
var jsIFrame = new JsObject.fromBrowserObject(iframe);
var contentHeight = jsIFrame["contentDocument"]["documentElement"]["scrollHeight"];
关于dart - iframe.contentDocument.documentElement.scrollHeight - Dart 等效项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28278031/