Check whether the elements path is the proper context for the specified
tag name in the DTD.

@param {String} tag The tag name.
@returns {Boolean}
973078
function( tag ) {
		var holder;

		// Check for block context.
		if ( tag in CKEDITOR.dtd.$block ) {
			// Indeterminate elements which are not subjected to be splitted or surrounded must be checked first.
			var inter = this.contains( CKEDITOR.dtd.$intermediate );
			holder = inter || ( this.root.equals( this.block ) && this.block ) || this.blockLimit;
			return !!holder.getDtd()[ tag ];
		}

		return true;
	}
1055283
function hasJSDocThisTag(node, sourceCode) {
		var jsdocComment = sourceCode.getJSDocComment(node);
	
		if (jsdocComment && thisTagPattern.test(jsdocComment.value)) {
			return true;
		}
	
		// Checks '@this' in its leading comments for callbacks,
		// because callbacks don't have its JSDoc comment.
		// e.g.
		//     sinon.test(/* @this sinon.Sandbox */function() { this.spy(); });
		return sourceCode.getComments(node).leading.some(function(comment) {
			return thisTagPattern.test(comment.value);
		});
	}
463286
function validCustomTag(tag, attrs, lkey, value) {
      // catch the div placeholder for the iframe replacement
      if (tag === 'img' && attrs['ta-insert-video']) {
          if (lkey === 'ta-insert-video' || lkey === 'allowfullscreen' || lkey === 'frameborder' || (lkey === 'contenteditble' && value === 'false')) {
              return true;
          }
      }
      return false;
  }
213476
protected boolean hasReadElfTag(String tag) {
        String tagValue = getReadElfTag(tag);
        return (tagValue != null && !tagValue.isEmpty());
    }
537316
function isCustomElement(element) {
  assertType(element, Node, false, 'Invalid element specified');

  let is = getAttribute(element, 'is');
  let tag = element.tagName.toLowerCase();

  if (is && (getElementRegistry(is) !== undefined)) return true;
  if (tag && (getElementRegistry(tag) !== undefined)) return true;
  return false;
}
802403
function isHTMLTag(html) {
    if (typeof HTMLElement === 'object') {
        return (html && (html instanceof HTMLElement));
    }

    return !!(html && html.nodeType && html.nodeType === 1);
}
1046593
function isXPathValid(xpath, node) {
        var contextNode = mirror.getReflection();
        return (engine.setDocument(mirror.getReflection())
            .selectSingleNode(xpath, contextNode, namespaceResolver) === node);
    }
201346
function parseAttributePath(attrPath, context) {
    const parsed = attrPath.split('.');
    parsed.forEach(item => checkIdentifier(item, context));
    return parsed;
}
1239297
function getImmediateCustomParentTag(tag) {
  var ptag = tag;
  while (ptag.__.isAnonymous) {
    if (!ptag.parent) { break }
    ptag = ptag.parent;
  }
  return ptag
}
328990
function (element, containerTag) {
    if (element && element.hasChildNodes)
      for (var i = 0; i < element.childNodes.length; ++i)
        if (element.childNodes[i].tagName == containerTag)
          return element.childNodes[i];
  
    return null;
  }
620772
public boolean isTagSupported(Element e)
    {
        if (e.getNodeName() != null && supported.contains(e.getNodeName().toLowerCase())) //completely supported tags
            return true;
        else //special cases
        {
            //empty anchor elements must be preserved
            if (e.getNodeName().toLowerCase().equals("a") && e.hasAttribute("name") 
                    && (e.getTextContent() == null || e.getTextContent().trim().length() == 0))
                return true;
            else
                return false;
        }
    }
199361
function (tag) {
            var node = document.createElementNS ('http://www.w3.org/2000/svg', tag)
            if ((tag === 'svg') && !$platform.IE) {
                node.setAttribute ('xmlns', 'http://www.w3.org/2000/svg') }
            return $(node) }
193345
function parseEndTag(tag, tagName) {

      // If no tag name is provided, clean shop
      if (!tagName)
        var pos = 0;

      // Find the closest opened tag of the same type
      else {
        tagName = tagName.toLowerCase();
        for (var pos = stack.length - 1; pos >= 0; pos--)
          if (stack[pos] == tagName)
            break;
      }

      if (pos >= 0) {
        // Close all the open elements, up the stack
        for (var i = stack.length - 1; i >= pos; i--)
          results += "</" + stack[i] + ">";

        // Remove the open elements from the stack
        stack.length = pos;
      }

    }
1307830
@SuppressWarnings("unchecked")
    public <T extends WebLocatorAbstractBuilder> T setTag(final String tag) {
        pathBuilder.setTag(tag);
        return (T) this;
    }
361450
function () {
            var placeholderPath = "";
            var currentContext = this._context;
            while (currentContext) {
                if (currentContext.placeholderPath) {
                    placeholderPath = currentContext.placeholderPath + ".";
                    break;
                }
                currentContext = currentContext.parent;
            }
            return placeholderPath + this._cfg.name;
        }
447657
function isNullEndTag(tagName) {
  let names = ['br', 'hr', 'img', 'input', 'link', 'meta'];
  tagName = tagName ? tagName.toLowerCase() : '';
  return names.indexOf(tagName) > -1 ? true : false;
}
641065
public static boolean matchesTags(Element e, String... tagNames) {

    assert e != null : "Element cannot be null";

    StringBuilder regExp = new StringBuilder("^(");
    int tagNameLenght = tagNames != null ? tagNames.length : 0;
    for (int i = 0; i < tagNameLenght; i++) {
      regExp.append(tagNames[i].toUpperCase());
      if (i < tagNameLenght - 1) {
        regExp.append("|");
      }
    }
    regExp.append(")$");

    return e.getTagName().toUpperCase().matches(regExp.toString());
  }