Chromium Code Reviews| Index: utils/apidoc/mdn/extract.dart |
| =================================================================== |
| --- utils/apidoc/mdn/extract.dart (revision 11346) |
| +++ utils/apidoc/mdn/extract.dart (working copy) |
| @@ -1,10 +1,9 @@ |
| #import ("dart:html"); |
| -#import ("dart:dom_deprecated", prefix:"dom"); |
| #import ("dart:json"); |
| // Workaround for HTML lib missing feature. |
| Range newRange() { |
| - return LevelDom.wrapRange(dom.document.createRange()); |
| + return document.createRange(); |
| } |
| // Temporary range object to optimize performance computing client rects |
| @@ -13,8 +12,8 @@ |
| // Hacks because ASYNC measurement is annoying when just writing a script. |
| ClientRect getClientRect(Node n) { |
| if (n is Element) { |
| - dom.Element raw = unwrapDomObject(n.dynamic); |
| - return LevelDom.wrapClientRect(raw.getBoundingClientRect()); |
| + // return LevelDom.wrapClientRect(n.$dom_getBoundingClientRect()); |
|
Jacob
2012/08/28 23:34:54
remove this commented out line
eub
2012/08/29 19:29:39
Done.
|
| + return n.$dom_getBoundingClientRect(); |
| } else { |
| // Crazy hacks that works for nodes.... create a range and measure it. |
| if (_tempRange == null) { |
| @@ -31,7 +30,7 @@ |
| * be removed when extracting blocks of documentation. This is helpful when |
| * running this script in a web browser as it is easy to visually see what |
| * blocks of information were extracted when using CSS such as DEBUG_CSS |
| - * which highlights elements that should be removed. |
| + * which highlights elements that should be removed. |
| */ |
| final DART_REMOVED = "dart-removed"; |
| @@ -383,7 +382,7 @@ |
| returnValueHeader = e; |
| } |
| } |
| - |
| + |
| if (parametersHeader != null) { |
| int numEmptyParameters = 0; |
| final parameterDescriptions = root.queryAll("dd"); |
| @@ -399,7 +398,7 @@ |
| parametersHeader.remove(); |
| for (final e in root.queryAll("dl")) { |
| e.remove(); |
| - } |
| + } |
| } else if (parameterDescriptions.length == 0 && |
| parametersHeader.nextElementSibling != null && |
| parametersHeader.nextElementSibling.text.trim() == 'None.') { |
| @@ -1187,7 +1186,7 @@ |
| // current class name. |
| for (String tag in [title.split(" ")[0], title.split(".").last()]) { |
| try { |
| - dom.Element element = dom.document.createElement(tag); |
| + Element element = document.createElement(tag); |
|
Jacob
2012/08/28 23:34:54
this isn't right... you want
new Element.tag(tag)
eub
2012/08/29 19:29:39
Done.
|
| // TODO(jacobr): this is a really ugly way of doing this that will |
| // stop working at some point soon. |
| if (element.typeName == currentType) { |
| @@ -1307,9 +1306,8 @@ |
| } |
| void documentLoaded(event) { |
| - // Load the database of expected methods and properties with an |
| - // XMLHttpRequest. |
| - new XMLHttpRequest.get('${window.location}.json', (req) { |
| + // Load the database of expected methods and properties with an HttpRequest. |
| + new HttpRequest.get('${window.location}.json', (req) { |
| data = JSON.parse(req.responseText); |
| dbEntry = {'members': [], 'srcUrl': pageUrl}; |
| run(); |