Update DOM documentation

pull/129/head
Thibaut 11 years ago
parent d6168cf7ab
commit b60e602b89

@ -11,15 +11,18 @@ module Docs
'Geolocation' => 'Geolocation', 'Geolocation' => 'Geolocation',
'Media Capture' => 'Media', 'Media Capture' => 'Media',
'Media Source' => 'Media', 'Media Source' => 'Media',
'MediaStream' => 'MediaRecorder',
'Navigation Timing' => 'Navigation Timing', 'Navigation Timing' => 'Navigation Timing',
'Network Information' => 'Network Information', 'Network Information' => 'Network Information',
'Web Audio' => 'Web Audio', 'Web Audio' => 'Web Audio',
'Web Workers' => 'Web Workers' } 'Web Workers' => 'Web Workers',
'WebRTC' => 'WebRTC' }
TYPE_BY_NAME_STARTS_WITH = { TYPE_BY_NAME_STARTS_WITH = {
'Audio' => 'Audio',
'Canvas' => 'Canvas', 'Canvas' => 'Canvas',
'ChildNode' => 'Node', 'ChildNode' => 'Node',
'console' => 'Console', 'Console' => 'Console',
'CSS' => 'CSS', 'CSS' => 'CSS',
'document' => 'Document', 'document' => 'Document',
'DocumentFragment' => 'DocumentFragment', 'DocumentFragment' => 'DocumentFragment',
@ -31,12 +34,14 @@ module Docs
'GlobalEventHandlers' => 'GlobalEventHandlers', 'GlobalEventHandlers' => 'GlobalEventHandlers',
'history' => 'History', 'history' => 'History',
'IDB' => 'IndexedDB', 'IDB' => 'IndexedDB',
'IndexedDB' => 'IndexedDB',
'Location' => 'Location', 'Location' => 'Location',
'navigator' => 'Navigator', 'navigator' => 'Navigator',
'Node' => 'Node', 'Node' => 'Node',
'Notification' => 'Notification', 'Notification' => 'Notification',
'ParentNode' => 'Node', 'ParentNode' => 'Node',
'Range' => 'Range', 'Range' => 'Range',
'RTC' => 'WebRTC',
'Selection' => 'Selection', 'Selection' => 'Selection',
'StyleSheet' => 'CSS', 'StyleSheet' => 'CSS',
'SVG' => 'SVG', 'SVG' => 'SVG',
@ -104,9 +109,9 @@ module Docs
end end
def include_default_entry? def include_default_entry?
!(node = doc.at_css '.overheadIndicator') || (node = doc.at_css '.overheadIndicator').nil? ||
!node.content.include?('not on a standards track') && type == 'Console' ||
!node.content.include?('removed from the Web') (node.content.exclude?('not on a standards track') && node.content.exclude?('removed from the Web'))
end end
end end
end end

@ -10,11 +10,9 @@ module Docs
# Don't want # Don't want
options[:skip] = %w( options[:skip] = %w(
/App /App
/Apps
/CallEvent /CallEvent
/CanvasPixelArray /CanvasPixelArray
/ChromeWorker /ChromeWorker
/ContactManager
/document.createProcessingInstruction /document.createProcessingInstruction
/document.documentURIObject /document.documentURIObject
/document.loadOverlay /document.loadOverlay
@ -33,9 +31,10 @@ module Docs
/PowerManager /PowerManager
/PushManager /PushManager
/ProcessingInstruction /ProcessingInstruction
/select.type
/TCPServerSocket /TCPServerSocket
/TCPSocket /TCPSocket
/TypeInfo
/Web_Video_Text_Tracks_Format
/WifiManager /WifiManager
/window.controllers /window.controllers
/window.crypto /window.crypto
@ -48,7 +47,6 @@ module Docs
/window.navigator.requestWakeLock /window.navigator.requestWakeLock
/window.updateCommands /window.updateCommands
/window.pkcs11 /window.pkcs11
/XMLDocument
/XMLHttpRequest/Using_XMLHttpRequest) /XMLHttpRequest/Using_XMLHttpRequest)
options[:skip_patterns] = [ options[:skip_patterns] = [
@ -57,20 +55,29 @@ module Docs
/moz/i, /moz/i,
/gecko/i, /gecko/i,
/webkit/i, /webkit/i,
/gamepad/i,
/UserData/,
/\A\/Camera/, /\A\/Camera/,
/\A\/DeviceStorage/, /\A\/DeviceStorage/,
/\A\/document\.xml/, /\A\/document\.xml/,
/\A\/XMLDocument/,
/\A\/DOMCursor/, /\A\/DOMCursor/,
/\A\/DOMRequest/, /\A\/DOMRequest/,
/\A\/element\.on/, /\A\/element\.on/,
/\A\/Entity/, /\A\/Entity/,
/\A\/HTMLIFrameElement\./,
/\A\/navigator\.id/i, /\A\/navigator\.id/i,
/\A\/Settings/, /\A\/Settings/,
/\A\/Telephony/, /\A\/Telephony/,
/\A\/Bluetooth/, /\A\/Bluetooth/,
/UserData/, /\A\/Window\.\w+bar/i,
/\A\/Window\.\w+bar/i] /\A\/CSS_Object_Model\//,
/\A\/Web_Audio_API\//,
/\A\/IndexedDB_API\//,
/\A\/MediaRecorder_API\//,
/\A\/Apps/,
/\A\/Contact/,
/\A\/L10n/,
/\A\/Permission/]
# Broken / Empty # Broken / Empty
options[:skip].concat %w( options[:skip].concat %w(
@ -86,7 +93,13 @@ module Docs
/Window.QueryInterface) /Window.QueryInterface)
# Duplicates # Duplicates
options[:skip].concat %w(/Reference) options[:skip].concat %w(
/Reference
/Index
/form.elements
/select.type
/table.rows
/XMLHttpRequest/FormData)
options[:fix_urls] = ->(url) do options[:fix_urls] = ->(url) do
return if url.include?('_') || url.include?('?') return if url.include?('_') || url.include?('?')
@ -99,6 +112,11 @@ module Docs
url.sub! "#{Dom.base_url}/notification", "#{Dom.base_url}/Notification" url.sub! "#{Dom.base_url}/notification", "#{Dom.base_url}/Notification"
url.sub! "#{Dom.base_url}/range", "#{Dom.base_url}/Range" url.sub! "#{Dom.base_url}/range", "#{Dom.base_url}/Range"
url.sub! "#{Dom.base_url}/Window", "#{Dom.base_url}/window" url.sub! "#{Dom.base_url}/Window", "#{Dom.base_url}/window"
url.sub! "#{Dom.base_url}/window.navigator", "#{Dom.base_url}/navigator"
url.sub! "#{Dom.base_url}/Selection/", "#{Dom.base_url}/Selection."
url.sub! "#{Dom.base_url}/windowTimers", "#{Dom.base_url}/window"
url.sub! "#{Dom.base_url}/windowEventHandlers", "#{Dom.base_url}/window"
url.sub! "#{Dom.base_url}/Screen.", "#{Dom.base_url}/window.screen"
url url
end end
end end

Loading…
Cancel
Save