History

Index DOM guides

Thibaut committed 12 years ago

Commit b9fed871 parent b60e6022 files · +17 −10Browse files

Unified · Split

2 files
  1. lib/docs/filters/dom/entries.rb +15 −4
  2. lib/docs/scrapers/mdn/dom.rb +2 −6
lib/docs/filters/dom/entries.rb+15−4
@@ -19,7 +19,7 @@ module Docs · 18 unmodified lines
1919 'WebRTC' => 'WebRTC' }
2020
2121 TYPE_BY_NAME_STARTS_WITH = {
22− 'Audio' => 'Audio',
22+ 'Audio' => 'Web Audio',
2323 'Canvas' => 'Canvas',
2424 'ChildNode' => 'Node',
2525 'Console' => 'Console',
@@ -34,9 +34,9 @@ module Docs · 8 unmodified lines
3434 'GlobalEventHandlers' => 'GlobalEventHandlers',
3535 'history' => 'History',
3636 'IDB' => 'IndexedDB',
37− 'IndexedDB' => 'IndexedDB',
3837 'Location' => 'Location',
3938 'navigator' => 'Navigator',
39+ 'MediaQuery' => 'MediaQuery',
4040 'Node' => 'Node',
4141 'Notification' => 'Notification',
4242 'ParentNode' => 'Node',
@@ -44,6 +44,7 @@ module Docs · 1 unmodified line
4444 'RTC' => 'WebRTC',
4545 'Selection' => 'Selection',
4646 'StyleSheet' => 'CSS',
47+ 'Stylesheet' => 'CSS',
4748 'SVG' => 'SVG',
4849 'Touch' => 'Touch',
4950 'TreeWalker' => 'TreeWalker',
@@ -53,8 +54,10 @@ module Docs · 3 unmodified lines
5354 'XMLHttpRequest' => 'XMLHTTPRequest' }
5455
5556 TYPE_BY_NAME_INCLUDES = {
56− 'WebGL' => 'Canvas',
57− 'Worker' => 'Web Workers' }
57+ 'IndexedDB' => 'IndexedDB',
58+ 'udio' => 'Web Audio',
59+ 'WebGL' => 'Canvas',
60+ 'Worker' => 'Web Workers' }
5861
5962 TYPE_BY_NAME_MATCHES = {
6063 /HTML\w*Element/ => 'Elements' }
@@ -67,8 +70,16 @@ module Docs · 6 unmodified lines
6770 'Web Audio API' => 'Web Audio',
6871 'XMLHTTPRequest' => 'XMLHTTPRequest' }
6972
73+ CLEANUP_NAMES = %w(
74+ CSS\ Object\ Model.
75+ Web\ Audio\ API.
76+ IndexedDB\ API.
77+ MediaRecorder\ API.
78+ XMLHttpRequest.)
79+
7080 def get_name
7181 name = super
82+ CLEANUP_NAMES.each { |str| name.remove!(str) }
7283 name.sub! 'Input.', 'HTMLInputElement.'
7384 name.sub! 'window.navigator', 'navigator'
7485 # Comment.Comment => Comment.constructor
lib/docs/scrapers/mdn/dom.rb+2−6
@@ -24,6 +24,7 @@ module Docs · 23 unmodified lines
2424 /Event/Comparison_of_Event_Targets
2525 /FMRadio
2626 /IDBDatabaseException
27+ /IndexedDB_API/Using_JavaScript_Generators_in_Firefox
2728 /NamedNodeMap
2829 /Node.baseURIObject
2930 /Node.nodePrincipal
@@ -46,8 +47,7 @@ module Docs · 16 unmodified lines
4647 /window.navigator.removeIdleObserver
4748 /window.navigator.requestWakeLock
4849 /window.updateCommands
49− /window.pkcs11
50− /XMLHttpRequest/Using_XMLHttpRequest)
50+ /window.pkcs11)
5151
5252 options[:skip_patterns] = [
5353 /NS/,
@@ -70,10 +70,6 @@ module Docs · 16 unmodified lines
7070 /\A\/Telephony/,
7171 /\A\/Bluetooth/,
7272 /\A\/Window\.\w+bar/i,
73− /\A\/CSS_Object_Model\//,
74− /\A\/Web_Audio_API\//,
75− /\A\/IndexedDB_API\//,
76− /\A\/MediaRecorder_API\//,
7773 /\A\/Apps/,
7874 /\A\/Contact/,
7975 /\A\/L10n/,