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
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_name80 def get_name
71 name = super81 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.constructor85 # Comment.Comment => Comment.constructor
lib/docs/scrapers/mdn/dom.rb+2−6
@@ -24,6 +24,7 @@ module Docs · 23 unmodified lines
24 /Event/Comparison_of_Event_Targets24 /Event/Comparison_of_Event_Targets
25 /FMRadio25 /FMRadio
26 /IDBDatabaseException26 /IDBDatabaseException
27 /IndexedDB_API/Using_JavaScript_Generators_in_Firefox
27 /NamedNodeMap28 /NamedNodeMap
28 /Node.baseURIObject29 /Node.baseURIObject
29 /Node.nodePrincipal30 /Node.nodePrincipal
@@ -46,8 +47,7 @@ module Docs · 16 unmodified lines
46 /window.navigator.removeIdleObserver47 /window.navigator.removeIdleObserver
47 /window.navigator.requestWakeLock48 /window.navigator.requestWakeLock
48 /window.updateCommands49 /window.updateCommands
49 /window.pkcs1150 /window.pkcs11)
50 /XMLHttpRequest/Using_XMLHttpRequest)
51 51
52 options[:skip_patterns] = [52 options[:skip_patterns] = [
53 /NS/,53 /NS/,
@@ -70,10 +70,6 @@ module Docs · 16 unmodified lines
70 /\A\/Telephony/,70 /\A\/Telephony/,
71 /\A\/Bluetooth/,71 /\A\/Bluetooth/,
72 /\A\/Window\.\w+bar/i,72 /\A\/Window\.\w+bar/i,
73 /\A\/CSS_Object_Model\//,
74 /\A\/Web_Audio_API\//,
75 /\A\/IndexedDB_API\//,
76 /\A\/MediaRecorder_API\//,
77 /\A\/Apps/,73 /\A\/Apps/,
78 /\A\/Contact/,74 /\A\/Contact/,
79 /\A\/L10n/,75 /\A\/L10n/,