OLD | NEW |
1 import 'dart:html'; | 1 import 'dart:html'; |
2 import 'dart:json' as json; | 2 import 'dart:json' as json; |
3 | 3 |
4 // Workaround for HTML lib missing feature. | 4 // Workaround for HTML lib missing feature. |
5 Range newRange() { | 5 Range newRange() { |
6 return document.createRange(); | 6 return document.createRange(); |
7 } | 7 } |
8 | 8 |
9 // Temporary range object to optimize performance computing client rects | 9 // Temporary range object to optimize performance computing client rects |
10 // from text nodes. | 10 // from text nodes. |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 final txt = r.text.trim().split(" ")[0].toLowerCase(); | 741 final txt = r.text.trim().split(" ")[0].toLowerCase(); |
742 if (txt == "description") { | 742 if (txt == "description") { |
743 helpIndex = i; | 743 helpIndex = i; |
744 break; | 744 break; |
745 } | 745 } |
746 i++; | 746 i++; |
747 } | 747 } |
748 | 748 |
749 // Figure out which column in the table contains member names by | 749 // Figure out which column in the table contains member names by |
750 // tracking how many member names each column contains. | 750 // tracking how many member names each column contains. |
751 final numMatches = new List<int>.fixedLength(i); | 751 final numMatches = new List<int>(i); |
752 for (int j = 0; j < i; j++) { | 752 for (int j = 0; j < i; j++) { |
753 numMatches[j] = 0; | 753 numMatches[j] = 0; |
754 } | 754 } |
755 | 755 |
756 // Find the column that seems to have the most names that look like | 756 // Find the column that seems to have the most names that look like |
757 // expected properties. | 757 // expected properties. |
758 for (Element r in t.queryAll("tbody tr")) { | 758 for (Element r in t.queryAll("tbody tr")) { |
759 ElementList row = r.elements; | 759 ElementList row = r.elements; |
760 if (row.length == 0 || row.first.classes.contains(".header")) { | 760 if (row.length == 0 || row.first.classes.contains(".header")) { |
761 continue; | 761 continue; |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1307 } | 1307 } |
1308 | 1308 |
1309 void documentLoaded(event) { | 1309 void documentLoaded(event) { |
1310 // Load the database of expected methods and properties with an HttpRequest. | 1310 // Load the database of expected methods and properties with an HttpRequest. |
1311 new HttpRequest.get('${window.location}.json', (req) { | 1311 new HttpRequest.get('${window.location}.json', (req) { |
1312 data = json.parse(req.responseText); | 1312 data = json.parse(req.responseText); |
1313 dbEntry = {'members': [], 'srcUrl': pageUrl}; | 1313 dbEntry = {'members': [], 'srcUrl': pageUrl}; |
1314 run(); | 1314 run(); |
1315 }); | 1315 }); |
1316 } | 1316 } |
OLD | NEW |