| @@ -19,7 +19,7 @@ module Docs · 18 unmodified lines |
| 19 | 'WebRTC' => 'WebRTC' } | 19 | 'WebRTC' => 'WebRTC' } |
| 20 | | 20 | |
| 21 | TYPE_BY_NAME_STARTS_WITH = { | 21 | TYPE_BY_NAME_STARTS_WITH = { |
| 22 | 'Audio' => 'Audio', | 22 | 'Audio' => 'Web Audio', |
| 23 | 'Canvas' => 'Canvas', | 23 | 'Canvas' => 'Canvas', |
| 24 | 'ChildNode' => 'Node', | 24 | 'ChildNode' => 'Node', |
| 25 | 'Console' => 'Console', | 25 | 'Console' => 'Console', |
| @@ -34,9 +34,9 @@ module Docs · 8 unmodified lines |
| 34 | 'GlobalEventHandlers' => 'GlobalEventHandlers', | 34 | 'GlobalEventHandlers' => 'GlobalEventHandlers', |
| 35 | 'history' => 'History', | 35 | 'history' => 'History', |
| 36 | 'IDB' => 'IndexedDB', | 36 | 'IDB' => 'IndexedDB', |
| 37 | 'IndexedDB' => 'IndexedDB', | | |
| 38 | 'Location' => 'Location', | 37 | 'Location' => 'Location', |
| 39 | 'navigator' => 'Navigator', | 38 | 'navigator' => 'Navigator', |
| | 39 | 'MediaQuery' => 'MediaQuery', |
| 40 | 'Node' => 'Node', | 40 | 'Node' => 'Node', |
| 41 | 'Notification' => 'Notification', | 41 | 'Notification' => 'Notification', |
| 42 | 'ParentNode' => 'Node', | 42 | 'ParentNode' => 'Node', |
| @@ -44,6 +44,7 @@ module Docs · 1 unmodified line |
| 44 | 'RTC' => 'WebRTC', | 44 | 'RTC' => 'WebRTC', |
| 45 | 'Selection' => 'Selection', | 45 | 'Selection' => 'Selection', |
| 46 | 'StyleSheet' => 'CSS', | 46 | 'StyleSheet' => 'CSS', |
| | 47 | 'Stylesheet' => 'CSS', |
| 47 | 'SVG' => 'SVG', | 48 | 'SVG' => 'SVG', |
| 48 | 'Touch' => 'Touch', | 49 | 'Touch' => 'Touch', |
| 49 | 'TreeWalker' => 'TreeWalker', | 50 | 'TreeWalker' => 'TreeWalker', |
| @@ -53,8 +54,10 @@ module Docs · 3 unmodified lines |
| 53 | 'XMLHttpRequest' => 'XMLHTTPRequest' } | 54 | 'XMLHttpRequest' => 'XMLHTTPRequest' } |
| 54 | | 55 | |
| 55 | TYPE_BY_NAME_INCLUDES = { | 56 | TYPE_BY_NAME_INCLUDES = { |
| 56 | 'WebGL' => 'Canvas', | 57 | 'IndexedDB' => 'IndexedDB', |
| 57 | 'Worker' => 'Web Workers' } | 58 | 'udio' => 'Web Audio', |
| | 59 | 'WebGL' => 'Canvas', |
| | 60 | 'Worker' => 'Web Workers' } |
| 58 | | 61 | |
| 59 | TYPE_BY_NAME_MATCHES = { | 62 | TYPE_BY_NAME_MATCHES = { |
| 60 | /HTML\w*Element/ => 'Elements' } | 63 | /HTML\w*Element/ => 'Elements' } |
| @@ -67,8 +70,16 @@ module Docs · 6 unmodified lines |
| 67 | 'Web Audio API' => 'Web Audio', | 70 | 'Web Audio API' => 'Web Audio', |
| 68 | 'XMLHTTPRequest' => 'XMLHTTPRequest' } | 71 | 'XMLHTTPRequest' => 'XMLHTTPRequest' } |
| 69 | | 72 | |
| | 73 | CLEANUP_NAMES = %w( |
| | 74 | CSS\ Object\ Model. |
| | 75 | Web\ Audio\ API. |
| | 76 | IndexedDB\ API. |
| | 77 | MediaRecorder\ API. |
| | 78 | XMLHttpRequest.) |
| | 79 | |
| 70 | def get_name | 80 | def get_name |
| 71 | name = super | 81 | name = super |
| | 82 | CLEANUP_NAMES.each { |str| name.remove!(str) } |
| 72 | name.sub! 'Input.', 'HTMLInputElement.' | 83 | name.sub! 'Input.', 'HTMLInputElement.' |
| 73 | name.sub! 'window.navigator', 'navigator' | 84 | name.sub! 'window.navigator', 'navigator' |
| 74 | # Comment.Comment => Comment.constructor | 85 | # Comment.Comment => Comment.constructor |