diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate
index 935f5d8b03c..4368af214ed 100644
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
@@ -1390,7 +1390,7 @@ $endif
contextElement = _parseDocument$NULLASSERT.createElement(tagName);
_parseDocument$NULLASSERT.body$NULLASSERT.append(contextElement);
}
- var fragment;
+ DocumentFragment fragment;
if (Range.supportsCreateContextualFragment &&
_canBeUsedToCreateContextualFragment) {
_parseRange$NULLASSERT.selectNodeContents(contextElement);
diff --git a/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate b/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate
index 8a49bc83410..b04677163c3 100644
--- a/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate
+++ b/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate
@@ -24,7 +24,7 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
'version and onUpgradeNeeded must be specified together'));
}
try {
- var request;
+ OpenDBRequest request;
if (version != null) {
request = _open(name, version);
} else {