Skip to content

Commit

Permalink
Fix for issue #117. The way of element creation fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey G. Grekhov committed Jul 7, 2017
1 parent 29a9f09 commit 5d3034e
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ import "dart:html";
import "../../../UtilsHtml/expect.dart";

class MyIFrameElement extends IFrameElement {
factory MyIFrameElement() {
return new Element.tag('my-iframe');
}

MyIFrameElement.created() : super.created();

String testit() => "In testit";
}

main() {
Expand All @@ -25,7 +31,8 @@ main() {
var tag = 'my-iframe';
document.register(tag, MyIFrameElement, extendsTag:"iframe");

ife = new Element.tag(tag);
ife = document.createElement('iframe', 'my-iframe');
document.body.append(ife);
Expect.isTrue(ife is MyIFrameElement);
Expect.equals("In testit", ife.testit());
}

0 comments on commit 5d3034e

Please sign in to comment.