/// <summary> /// This is a javascript application. /// </summary> /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param> public Application(IApp page) { var x = new IHTMLButton { "x" }.AttachToDocument(); var y = new IHTMLButton { "y" }.AttachToDocument(); x.setAttribute("bar", "foo"); y.setAttribute("foo", "bar"); new IHTMLContent { }.AttachTo(Native.body.shadow).With( async content => { // http://www.w3.org/TR/shadow-dom/#dfn-matching-criteria content.select = "[foo=bar]"; await y.async.onclick; content.select = "[bar=foo]"; } ); }