| OLD | NEW |
| 1 /** | 1 /** |
| 2 * HTML elements and other resources for web-based applications that need to | 2 * HTML elements and other resources for web-based applications that need to |
| 3 * interact with the browser and the DOM (Document Object Model). | 3 * interact with the browser and the DOM (Document Object Model). |
| 4 * | 4 * |
| 5 * This library includes DOM element types, CSS styling, local storage, | 5 * This library includes DOM element types, CSS styling, local storage, |
| 6 * media, speech, events, and more. | 6 * media, speech, events, and more. |
| 7 * To get started, | 7 * To get started, |
| 8 * check out the [Element] class, the base class for many of the HTML | 8 * check out the [Element] class, the base class for many of the HTML |
| 9 * DOM types. | 9 * DOM types. |
| 10 * | 10 * |
| (...skipping 19416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19427 return JS('', '#[#]', jso, _wrapper); | 19427 return JS('', '#[#]', jso, _wrapper); |
| 19428 } | 19428 } |
| 19429 var constructor = JS('', '#.constructor', jso) | 19429 var constructor = JS('', '#.constructor', jso) |
| 19430 var f = null; | 19430 var f = null; |
| 19431 String name; | 19431 String name; |
| 19432 bool skip = false; | 19432 bool skip = false; |
| 19433 while (f == null) { | 19433 while (f == null) { |
| 19434 name = JS('String', '#.name', constructor); | 19434 name = JS('String', '#.name', constructor); |
| 19435 f = getHtmlCreateFunction(name); | 19435 f = getHtmlCreateFunction(name); |
| 19436 if (f == null) { | 19436 if (f == null) { |
| 19437 console.error('Could not instantiate $name'); | 19437 console.warn('Could not instantiate $name'); |
| 19438 skip = true; | 19438 skip = true; |
| 19439 constructor = JS('', '#.__proto__', constructor); | 19439 constructor = JS('', '#.__proto__', constructor); |
| 19440 } | 19440 } |
| 19441 } | 19441 } |
| 19442 if (skip) { | 19442 if (skip) { |
| 19443 console.info('Instantiated $name instead'); | 19443 console.info('Instantiated $name instead'); |
| 19444 } | 19444 } |
| 19445 var wrapped = f(); | 19445 var wrapped = f(); |
| 19446 wrapped.raw = jso; | 19446 wrapped.raw = jso; |
| 19447 JS('', '#[#] = #', jso, _wrapper, wrapped); | 19447 JS('', '#[#] = #', jso, _wrapper, wrapped); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19569 return null; | 19569 return null; |
| 19570 } | 19570 } |
| 19571 | 19571 |
| 19572 Function _getHtmlFunction(String key) { | 19572 Function _getHtmlFunction(String key) { |
| 19573 if (htmlBlinkFunctionMap.containsKey(key)) { | 19573 if (htmlBlinkFunctionMap.containsKey(key)) { |
| 19574 return htmlBlinkFunctionMap[key](); | 19574 return htmlBlinkFunctionMap[key](); |
| 19575 } | 19575 } |
| 19576 return null; | 19576 return null; |
| 19577 } | 19577 } |
| 19578 | 19578 |
| OLD | NEW |