bundles/org.eclipse.orion.client.webtools/web/webtools/htmlContentAssist.js
function(node, source, params) {
			if(node) {
				var offset = params.offset;
				if(node.type === 'tag') {
					var tagNameEnd = node.range[0] + 1 + node.name.length;
					if(tagNameEnd < offset) {
						if (node.openrange){
							return offset < node.openrange[1] || (offset === node.openrange[1] && source[offset-1] !== '>' && source[offset-1] !== '<');
						}
						// TODO openrange from htmlparser2 is more accurate, consider removing this legacy range check
						var idx = offset;
						while(idx < node.range[1]) {
							var char = source[idx];
							if(char === '<') {
								return false;
							} else if(char === '>') {
								return true;
							}
							idx++;
						}
					}
				} else if(node.type === 'attr') {
					return offset >= node.range[0] || offset <= node.range[1];
				}
			}
			return false;
		}
function(node, source, params) {
			if(node) {
				var offset = params.offset;
				if(node.type === 'tag') {
					var tagNameEnd = node.range[0] + 1 + node.name.length;
					if(tagNameEnd < offset) {
						if (node.openrange){
							return offset < node.openrange[1] || (offset === node.openrange[1] && source[offset-1] !== '>' && source[offset-1] !== '<');
						}
						// TODO openrange from htmlparser2 is more accurate, consider removing this legacy range check
						var idx = offset;
						while(idx < node.range[1]) {
							var char = source[idx];
							if(char === '<') {
								return false;
							} else if(char === '>') {
								return true;
							}
							idx++;
						}
					}
				} else if(node.type === 'attr') {
					return offset >= node.range[0] || offset <= node.range[1];
				}
			}
			return false;
		}
function ( node , source , params ) { if ( node ) { var offset = params . offset ; if ( node . type === 'tag' ) { var tagNameEnd = node . range [ 0 ] + 1 + node . name . length ; if ( tagNameEnd < offset ) { if ( node . openrange ) { return offset < node . openrange [ 1 ] || ( offset === node . openrange [ 1 ] && source [ offset - 1 ] !== '>' && source [ offset - 1 ] !== '<' ) ; } // TODO openrange from htmlparser2 is more accurate, consider removing this legacy range check var idx = offset ; while ( idx < node . range [ 1 ] ) { var char = source [ idx ] ; if ( char === '<' ) { return false ; } else if ( char === '>' ) { return true ; } idx ++ ; } } } else if ( node . type === 'attr' ) { return offset >= node . range [ 0 ] || offset <= node . range [ 1 ] ; } } return false ; }
Computes if we are trying to complete tag attributes
@param {Object} node The AST node to check with the offset
@param {String} source The backing source
@param {Object} params The parameters
@returns {Boolean} True if we are completing the attributes of a tag, false otherwise
@since 10.0
Computes if we are trying to complete tag attributes