Exemplo n.º 1
0
        void initOptions()
        {
            // load the options html into the known iframe src
            var parent = window.GetProperty("parent") as ScriptObject;
            var parentDocument = parent.GetProperty("document") as HtmlDocument;
            var optionsIFrame = parentDocument.GetElementById("options");
            optionsIFrame.SetAttribute("src", "Lesson14.html");
            optionsIFrame.AttachEvent("onload", delegate(object sender, EventArgs args) {
                optionsDocument = optionsIFrame.GetProperty("contentDocument") as HtmlDocument;

                // Resize the options iframe height to the options html height
                var optionsBody = optionsDocument.GetProperty("body") as HtmlElement;
                var optionsHeight = optionsBody.GetProperty("scrollHeight");
                optionsIFrame.SetAttribute("height", optionsHeight + "px");
            });
        }