| Index: tools/dom/templates/html/impl/impl_Document.darttemplate
|
| diff --git a/tools/dom/templates/html/impl/impl_Document.darttemplate b/tools/dom/templates/html/impl/impl_Document.darttemplate
|
| index ea3d901ead81f51ff56c446b24a75b4f275b750a..a9b19cf4467bf05c724769ca39c45bd358c9411f 100644
|
| --- a/tools/dom/templates/html/impl/impl_Document.darttemplate
|
| +++ b/tools/dom/templates/html/impl/impl_Document.darttemplate
|
| @@ -26,7 +26,11 @@ $!MEMBERS
|
| * [CSS selector specification](http://www.w3.org/TR/css3-selectors/).
|
| */
|
| ElementList<Element> querySelectorAll(String selectors) {
|
| +$if JSINTEROP
|
| + return _querySelectorAll(selectors);
|
| +$else
|
| return new _FrozenElementList._wrap(_querySelectorAll(selectors));
|
| +$endif
|
| }
|
|
|
| /**
|
| @@ -66,49 +70,16 @@ $endif
|
| $if DART2JS
|
| return _createElement(tagName, typeExtension);
|
| $else
|
| - var newElement = (typeExtension == null) ?
|
| - _blink.BlinkDocument.instance.createElement_Callback_1_(unwrap_jso(this), tagName) :
|
| - _blink.BlinkDocument.instance.createElement_Callback_2_(unwrap_jso(this), tagName, typeExtension);
|
| -
|
| - var wrapped;
|
| -
|
| - if (newElement['dart_class'] != null) {
|
| - wrapped = newElement['dart_class']; // Here's our Dart class.
|
| - wrapped.blink_jsObject = newElement;
|
| - } else {
|
| - wrapped = wrap_jso(newElement);
|
| - if (wrapped == null) {
|
| - wrapped = wrap_jso_custom_element(newElement);
|
| - }
|
| - }
|
| -
|
| - return wrapped;
|
| -$endif
|
| - }
|
| -
|
| - @DomName('Document.createElementNS')
|
| - @DocsEditable()
|
| - Element createElementNS(String namespaceURI, String qualifiedName, [String typeExtension]) {
|
| -$if DART2JS
|
| - return _createElementNS(tagName, qualifiedName, typeExtension);
|
| -$else
|
| - var newElement = (typeExtension == null) ?
|
| - _blink.BlinkDocument.instance.createElementNS_Callback_2_(unwrap_jso(this), namespaceURI, qualifiedName) :
|
| - _blink.BlinkDocument.instance.createElementNS_Callback_3_(unwrap_jso(this), namespaceURI, qualifiedName, typeExtension);
|
| -
|
| - var wrapped;
|
| -
|
| - if (newElement['dart_class'] != null) {
|
| - wrapped = newElement['dart_class']; // Here's our Dart class.
|
| - wrapped.blink_jsObject = newElement;
|
| - } else {
|
| - wrapped = wrap_jso(newElement);
|
| - if (wrapped == null) {
|
| - wrapped = wrap_jso_custom_element(newElement);
|
| - }
|
| - }
|
| -
|
| - return wrapped;
|
| + $if JSINTEROP
|
| + return _createElement(tagName, typeExtension);
|
| + $else
|
| + if (typeExtension != null) {
|
| + return _createElement(tagName, typeExtension);
|
| + } else {
|
| + // Fast-path for Dartium when typeExtension is not needed.
|
| + return _Utils.createElement(this, tagName);
|
| + }
|
| + $endif
|
| $endif
|
| }
|
|
|
|
|