mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	runtime/javascript: e7b1ea0276cc83cd5c612f3189a174a60d57b5ed
Port javascript autocomplete file only.
This commit is contained in:
		| @@ -1,7 +1,9 @@ | |||||||
| " Vim completion script | " Vim completion script | ||||||
| " Language:	Java Script | " Language:	Java Script | ||||||
| " Maintainer:	Mikolaj Machowski ( mikmach AT wp DOT pl ) | " Maintainer:	Jay Sitter (jay@jaysitter.com) | ||||||
| " Last Change:	2017 Mar 04 | " URL: https://github.com/jsit/javascriptcomplete.vim/ | ||||||
|  | " Previous Maintainer:	Mikolaj Machowski ( mikmach AT wp DOT pl ) | ||||||
|  | " Last Change:	2020 Jul 30 | ||||||
|  |  | ||||||
| function! javascriptcomplete#CompleteJS(findstart, base) | function! javascriptcomplete#CompleteJS(findstart, base) | ||||||
|   if a:findstart |   if a:findstart | ||||||
| @@ -154,12 +156,30 @@ function! javascriptcomplete#CompleteJS(findstart, base) | |||||||
| 					\ 'text', 'vLink'] | 					\ 'text', 'vLink'] | ||||||
| 		let bodys = bodyprop | 		let bodys = bodyprop | ||||||
| 		" Document - document. | 		" Document - document. | ||||||
| 		let docuprop = ['anchors', 'applets', 'childNodes', 'embeds', 'forms', 'images', 'links', 'stylesheets', | 		let docuprop = ['anchors', 'body', 'characterSet', 'doctype', | ||||||
| 					\ 'body', 'cookie', 'documentElement', 'domain', 'lastModified', 'referrer', 'title', 'URL'] | 					\ 'documentElement', 'documentURI', 'embeds', 'fonts', 'forms', | ||||||
| 		let documeth = ['close', 'createAttribute', 'createElement', 'createTextNode', 'focus', 'getElementById', | 					\ 'head', 'hidden', 'images', 'implementation', 'lastStyleSheetSet', | ||||||
| 					\ 'getElementsByName', 'getElementsByTagName', 'open', 'write', 'writeln', | 					\ 'links', 'plugins', 'preferredStyleSheetSet', 'scripts', | ||||||
| 					\ 'onClick', 'onDblClick', 'onFocus', 'onKeyDown', 'onKeyPress', 'onKeyUp', | 					\ 'scrollingElement', 'selectedStyleSheetSet', 'styleSheetSets', | ||||||
| 					\ 'onMouseDown', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onResize'] | 					\ 'timeline', 'visibilityState', 'cookie', 'defaultView', | ||||||
|  | 					\ 'designMode', 'dir', 'domain', 'lastModified', 'location', | ||||||
|  | 					\ 'readyState', 'referrer', 'title', 'URL', 'activeElement', | ||||||
|  | 					\ 'fullscreenElement', 'styleSheets'] | ||||||
|  | 		let documeth = ['adoptNode', 'close', 'createAttribute', | ||||||
|  | 					\ 'createAttributeNS', 'createCDATASection', 'createComment', | ||||||
|  | 					\ 'createDocumentFragment', 'createElement', 'createElementNS', | ||||||
|  | 					\ 'createEvent', 'createExpression', 'createNSResolver', | ||||||
|  | 					\ 'createNodeIterator', 'createProcessingInstruction', 'createRange', | ||||||
|  | 					\ 'createTextNode', 'createTouchList', 'createTreeWalker', | ||||||
|  | 					\ 'enableStyleSheetsForSet', 'evaluate', 'focus', 'getElementById', | ||||||
|  | 					\ 'getElementById', 'getElementsByClassName', 'getElementsByName', | ||||||
|  | 					\ 'getElementsByTagName', 'getElementsByTagNameNS', | ||||||
|  | 					\ 'hasStorageAccess', 'importNode', 'onClick', 'onDblClick', | ||||||
|  | 					\ 'onFocus', 'onKeyDown', 'onKeyPress', 'onKeyUp', 'onMouseDown', | ||||||
|  | 					\ 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', | ||||||
|  | 					\ 'onResize', 'open', 'querySelector', 'querySelectorAll', | ||||||
|  | 					\ 'requestStorageAccess', 'write', 'writeln'] | ||||||
|  |  | ||||||
| 		call map(documeth, 'v:val."("') | 		call map(documeth, 'v:val."("') | ||||||
| 		let docuxprop = ['attributes', 'childNodes', 'doctype', 'documentElement', 'firstChild', | 		let docuxprop = ['attributes', 'childNodes', 'doctype', 'documentElement', 'firstChild', | ||||||
| 					\ 'implementation', 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType', | 					\ 'implementation', 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType', | ||||||
| @@ -368,9 +388,11 @@ function! javascriptcomplete#CompleteJS(findstart, base) | |||||||
| 		let xdomelemprop = ['attributes', 'childNodes', 'firstChild', 'lastChild',  | 		let xdomelemprop = ['attributes', 'childNodes', 'firstChild', 'lastChild',  | ||||||
| 					\ 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue', | 					\ 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue', | ||||||
| 					\ 'ownerDocument', 'parentNode', 'prefix', 'previousSibling', 'tagName'] | 					\ 'ownerDocument', 'parentNode', 'prefix', 'previousSibling', 'tagName'] | ||||||
| 		let xdomelemmeth = ['appendChild', 'cloneNode', 'getAttribute', 'getAttributeNode', | 		let xdomelemmeth = ['appendChild', 'addEventListener', 'cloneNode', | ||||||
| 					\ 'getElementsByTagName', 'hasChildNodes', 'insertBefore', 'normalize', | 					\ 'dispatchEvent', 'getAttribute', 'getAttributeNode', | ||||||
| 					\ 'removeAttribute', 'removeAttributeNode', 'removeChild', 'replaceChild', | 					\ 'getElementsByTagName', 'hasChildNodes', 'insertBefore', | ||||||
|  | 					\ 'normalize', 'removeAttribute', 'removeAttributeNode', | ||||||
|  | 					\ 'removeChild', 'removeEventListener', 'replaceChild', | ||||||
| 					\ 'setAttribute', 'setAttributeNode'] | 					\ 'setAttribute', 'setAttributeNode'] | ||||||
| 		call map(xdomelemmeth, 'v:val."("') | 		call map(xdomelemmeth, 'v:val."("') | ||||||
| 		let xdomelems = xdomelemprop + xdomelemmeth | 		let xdomelems = xdomelemprop + xdomelemmeth | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jan Edmund Lazo
					Jan Edmund Lazo