bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js
function(node, source, params) {
			var proposals = [];
			var prefix = params.prefix ? params.prefix : "";
			// we need to check if we need to rebuild the prefix for completion that contains a '-'
			var index = params.offset - prefix.length - 1;
			if (index > 0 && index < source.length) {
				var precedingChar = source.charAt(index);
				if (precedingChar === '=' && prefix.length === 0 && (index - 1) > 0) {
					precedingChar = source.charAt(index - 1);
					if (/[A-Za-z0-9_]/.test(precedingChar)) {
						proposals.push(this.makeComputedProposal("\"\"",  Messages['addQuotesToAttributes'], " - \"\"", null, prefix)); //$NON-NLS-1$ //$NON-NLS-2$
						return proposals;
					}
				}
			}
			var attrs = Attributes.getAttributesForNode(node);
			if(Array.isArray(attrs.global)) {
				proposals = proposals.concat(this.addProposals(node, attrs.global, params));
			}
			if(Array.isArray(attrs.formevents)) {
				var arr = this.addProposals(node, attrs.formevents, params);
				if(arr.length > 0) {
					proposals.push({
							proposal: '',
							description: Messages['formeventsHeader'],
							style: 'noemphasis_title', //$NON-NLS-1$
							unselectable: true,
							kind: 'html' //$NON-NLS-1$
					});
					proposals = proposals.concat(arr);
				}
			}
			if(Array.isArray(attrs.keyboardevents)) {
				arr = this.addProposals(node, attrs.keyboardevents, params);
				if(arr.length > 0) {
					proposals.push({
							proposal: '',
							description: Messages['keyboardeventsHeader'],
							style: 'noemphasis_title', //$NON-NLS-1$
							unselectable: true,
							kind: 'html' //$NON-NLS-1$
					});
					proposals = proposals.concat(arr);
				}
			}
			if(Array.isArray(attrs.mouseevents)) {
				arr = this.addProposals(node, attrs.mouseevents, params);
				if(arr.length > 0) {
					proposals.push({
							proposal: '',
							description: Messages['mouseeventsHeader'],
							style: 'noemphasis_title', //$NON-NLS-1$
							unselectable: true,
							kind: 'html' //$NON-NLS-1$
						});
					proposals = proposals.concat(arr);
				}
			}
			if(Array.isArray(attrs.windowevents) && attrs.windowevents.length > 0) {
				arr = this.addProposals(node, attrs.windowevents, params);
				if(arr.length > 0) {
					proposals.push({
							proposal: '',
							description: Messages['windoweventsHeader'],
							style: 'noemphasis_title', //$NON-NLS-1$
							unselectable: true,
							kind: 'html' //$NON-NLS-1$
						});
					proposals = proposals.concat(arr);
				}
			}
			if(Array.isArray(attrs.aria)) {
				arr = this.addProposals(node, attrs.aria, params);
				if(arr.length > 0) {
					proposals.push({
							proposal: '',
							description: 'ARIA', //$NON-NLS-1$
							style: 'noemphasis_title', //$NON-NLS-1$
							unselectable: true,
							kind: 'html' //$NON-NLS-1$
					});
					proposals = proposals.concat(arr);
				}
			}
			return proposals;
		}
function(node, source, params) {
			var proposals = [];
			var prefix = params.prefix ? params.prefix : "";
			// we need to check if we need to rebuild the prefix for completion that contains a '-'
			var index = params.offset - prefix.length - 1;
			if (index > 0 && index < source.length) {
				var precedingChar = source.charAt(index);
				if (precedingChar === '=' && prefix.length === 0 && (index - 1) > 0) {
					precedingChar = source.charAt(index - 1);
					if (/[A-Za-z0-9_]/.test(precedingChar)) {
						proposals.push(this.makeComputedProposal("\"\"",  Messages['addQuotesToAttributes'], " - \"\"", null, prefix)); //$NON-NLS-1$ //$NON-NLS-2$
						return proposals;
					}
				}
			}
			var attrs = Attributes.getAttributesForNode(node);
			if(Array.isArray(attrs.global)) {
				proposals = proposals.concat(this.addProposals(node, attrs.global, params));
			}
			if(Array.isArray(attrs.formevents)) {
				var arr = this.addProposals(node, attrs.formevents, params);
				if(arr.length > 0) {
					proposals.push({
							proposal: '',
							description: Messages['formeventsHeader'],
							style: 'noemphasis_title', //$NON-NLS-1$
							unselectable: true,
							kind: 'html' //$NON-NLS-1$
					});
					proposals = proposals.concat(arr);
				}
			}
			if(Array.isArray(attrs.keyboardevents)) {
				arr = this.addProposals(node, attrs.keyboardevents, params);
				if(arr.length > 0) {
					proposals.push({
							proposal: '',
							description: Messages['keyboardeventsHeader'],
							style: 'noemphasis_title', //$NON-NLS-1$
							unselectable: true,
							kind: 'html' //$NON-NLS-1$
					});
					proposals = proposals.concat(arr);
				}
			}
			if(Array.isArray(attrs.mouseevents)) {
				arr = this.addProposals(node, attrs.mouseevents, params);
				if(arr.length > 0) {
					proposals.push({
							proposal: '',
							description: Messages['mouseeventsHeader'],
							style: 'noemphasis_title', //$NON-NLS-1$
							unselectable: true,
							kind: 'html' //$NON-NLS-1$
						});
					proposals = proposals.concat(arr);
				}
			}
			if(Array.isArray(attrs.windowevents) && attrs.windowevents.length > 0) {
				arr = this.addProposals(node, attrs.windowevents, params);
				if(arr.length > 0) {
					proposals.push({
							proposal: '',
							description: Messages['windoweventsHeader'],
							style: 'noemphasis_title', //$NON-NLS-1$
							unselectable: true,
							kind: 'html' //$NON-NLS-1$
						});
					proposals = proposals.concat(arr);
				}
			}
			if(Array.isArray(attrs.aria)) {
				arr = this.addProposals(node, attrs.aria, params);
				if(arr.length > 0) {
					proposals.push({
							proposal: '',
							description: 'ARIA', //$NON-NLS-1$
							style: 'noemphasis_title', //$NON-NLS-1$
							unselectable: true,
							kind: 'html' //$NON-NLS-1$
					});
					proposals = proposals.concat(arr);
				}
			}
			return proposals;
		}
function ( node , source , params ) { var proposals = [ ] ; var prefix = params . prefix ? params . prefix : "" ; // we need to check if we need to rebuild the prefix for completion that contains a '-' var index = params . offset - prefix . length - 1 ; if ( index > 0 && index < source . length ) { var precedingChar = source . charAt ( index ) ; if ( precedingChar === '=' && prefix . length === 0 && ( index - 1 ) > 0 ) { precedingChar = source . charAt ( index - 1 ) ; if ( / [A-Za-z0-9_] / . test ( precedingChar ) ) { proposals . push ( this . makeComputedProposal ( "\"\"" , Messages [ 'addQuotesToAttributes' ] , " - \"\"" , null , prefix ) ) ; //$NON-NLS-1$ //$NON-NLS-2$ return proposals ; } } } var attrs = Attributes . getAttributesForNode ( node ) ; if ( Array . isArray ( attrs . global ) ) { proposals = proposals . concat ( this . addProposals ( node , attrs . global , params ) ) ; } if ( Array . isArray ( attrs . formevents ) ) { var arr = this . addProposals ( node , attrs . formevents , params ) ; if ( arr . length > 0 ) { proposals . push ( { proposal : '' , description : Messages [ 'formeventsHeader' ] , style : 'noemphasis_title' , //$NON-NLS-1$ unselectable : true , kind : 'html' //$NON-NLS-1$ } ) ; proposals = proposals . concat ( arr ) ; } } if ( Array . isArray ( attrs . keyboardevents ) ) { arr = this . addProposals ( node , attrs . keyboardevents , params ) ; if ( arr . length > 0 ) { proposals . push ( { proposal : '' , description : Messages [ 'keyboardeventsHeader' ] , style : 'noemphasis_title' , //$NON-NLS-1$ unselectable : true , kind : 'html' //$NON-NLS-1$ } ) ; proposals = proposals . concat ( arr ) ; } } if ( Array . isArray ( attrs . mouseevents ) ) { arr = this . addProposals ( node , attrs . mouseevents , params ) ; if ( arr . length > 0 ) { proposals . push ( { proposal : '' , description : Messages [ 'mouseeventsHeader' ] , style : 'noemphasis_title' , //$NON-NLS-1$ unselectable : true , kind : 'html' //$NON-NLS-1$ } ) ; proposals = proposals . concat ( arr ) ; } } if ( Array . isArray ( attrs . windowevents ) && attrs . windowevents . length > 0 ) { arr = this . addProposals ( node , attrs . windowevents , params ) ; if ( arr . length > 0 ) { proposals . push ( { proposal : '' , description : Messages [ 'windoweventsHeader' ] , style : 'noemphasis_title' , //$NON-NLS-1$ unselectable : true , kind : 'html' //$NON-NLS-1$ } ) ; proposals = proposals . concat ( arr ) ; } } if ( Array . isArray ( attrs . aria ) ) { arr = this . addProposals ( node , attrs . aria , params ) ; if ( arr . length > 0 ) { proposals . push ( { proposal : '' , description : 'ARIA' , //$NON-NLS-1$ style : 'noemphasis_title' , //$NON-NLS-1$ unselectable : true , kind : 'html' //$NON-NLS-1$ } ) ; proposals = proposals . concat ( arr ) ; } } return proposals ; }
Returns the attributes that can be used in the specified tag
@param {Object} node The AST node for the tag we are completing within
@param {Object} params The parameters
@returns {Array.<Object>} The array of proposals
@since 10.0
Returns the attributes that can be used in the specified tag