[object HTMLIFrameElement]이 문서를 가져오고 싶습니다. 나는 오히려 고유 한 방법없이 그것을 할 것입니다. 이것은 내가 지금 시도하는 것입니다,하지만 그것은 작동하지 않습니다. 의미하는 것이다GWT에서 HTMLIFrameElement의 Document 객체를 얻는 방법
//This is iFrame container with iFrame
mainWidge = new MainWidgetViewImpl(base);
//This is HTMLIFrameElement
Element iframeElement = mainWidge.getElement().getFirstChildElement();
//I've tried this, but it gets null pointer exception
IFrameElement iframe = (IFrameElement)mainWidge.getElement().getFirstChildElement();
//Here is: "Cannot read property 'document' of null"
Document doc = iframe.getContentDocument();
내 목표는이 표시되기 전에 iframe 대응의 머리 부분에 스타일 시트를 주입하는 것입니다. 이드를 이길 수있는 방법이 있나? –
문서에 iframe을 연결한다고해서 반드시 보이게하는 것은 아닙니다. –
이것은 일종의 해결책입니다. 하지만 오히려 onLoad 이벤트 전에 이러한 스타일을 주입하고 싶습니다. 그래서 그들은 처음부터 사용할 수 있습니다. –