chore(typing): use types for DOM API
This is possible now that ts2dart special cases these for dart. Fixes #2770
This commit is contained in:
@@ -115,8 +115,7 @@ export function main() {
|
||||
tc.detectChanges();
|
||||
|
||||
var newlyInsertedElement = DOM.childNodes(tc.nativeElement)[1];
|
||||
expect((</*(#2770) HTMLElement*/ any>newlyInsertedElement).id)
|
||||
.toEqual("new value");
|
||||
expect((<HTMLElement>newlyInsertedElement).id).toEqual("new value");
|
||||
async.done();
|
||||
});
|
||||
});
|
||||
@@ -210,8 +209,7 @@ export function main() {
|
||||
tc.detectChanges();
|
||||
|
||||
var newlyInsertedElement = DOM.nextSibling(tc.nativeElement);
|
||||
expect((</*(#2770) HTMLElement*/ any>newlyInsertedElement).id)
|
||||
.toEqual("new value");
|
||||
expect((<HTMLElement>newlyInsertedElement).id).toEqual("new value");
|
||||
|
||||
async.done();
|
||||
});
|
||||
|
||||
@@ -107,11 +107,10 @@ export function main() {
|
||||
|
||||
var el = DOM.childNodes(tb.rootEl)[0];
|
||||
tb.renderer.setElementProperty(elRef(cmpView.viewRef, 0), 'value', 'hello');
|
||||
expect((</*(#2770) HTMLInputElement*/ any>el).value).toEqual('hello');
|
||||
expect((<HTMLInputElement>el).value).toEqual('hello');
|
||||
|
||||
tb.renderer.setElementClass(elRef(cmpView.viewRef, 0), 'a', true);
|
||||
expect((</*(#2770) HTMLInputElement*/ any>DOM.childNodes(tb.rootEl)[0]).value)
|
||||
.toEqual('hello');
|
||||
expect((<HTMLInputElement>DOM.childNodes(tb.rootEl)[0]).value).toEqual('hello');
|
||||
tb.renderer.setElementClass(elRef(cmpView.viewRef, 0), 'a', false);
|
||||
expect(DOM.hasClass(el, 'a')).toBe(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user