Everything below IE9 doesn't know how to treat HTML5 tags

@param {Object} context The document object on which to check HTML5 support

@example
wysihtml5.browser.supportsHTML5Tags(document);
320420
function(context) {
      var element = context.createElement("div"),
          html5   = "<article>foo</article>";
      element.innerHTML = html5;
      return element.innerHTML.toLowerCase() === html5;
    }
728795
function detect_doc(docs, customTags) {
    var ignore_tags = _.union(["param", "return", "author", "version", 
                               "cancelable", "bubbles", "since", "inherits", "todo", "deprecated"], customTags);
    var doc_tags = _.filter(docs, function(tag) { return !_.include(ignore_tags, tag["tagname"]) && !subproperty(tag) });
    return _.compact(_.map(doc_tags, function(tag) { return tag["doc"] })).join(" ");
}
1283768
function _mkdom(templ, html) {

    var match = templ && templ.match(/^\s*<([-\w]+)/),
      tagName = match && match[1].toLowerCase(),
      rootTag = rootEls[tagName] || GENERIC,
      el = mkEl(rootTag)

    el.stub = true

    // replace all the yield tags with the tag inner html
    if (html) templ = replaceYield(templ, html)

    /* istanbul ignore next */
    if (checkIE && tagName && (match = tagName.match(SPECIAL_TAGS_REGEX)))
      ie9elem(el, templ, tagName, !!match[1])
    else
      el.innerHTML = templ

    return el
  }
897440
function(context) {
		this._keymap = Object.create(null);
		["keydown", "keypress", "keyup"].forEach(function(type) {
			context.document.addEventListener(type, this, false);
		}, this);
	}
1169177
protected boolean parse(ParsingContext context) {
		try {
			context.getParserInterceptor().openContext(context);
			boolean specialTagFound = false;
			final String lineSeparator = getLineSeparator();
			while (context.getMatcher().find()) {
				int groupIndex = findFirstGroup(context.getMatcher(), 0);
				final String tagName = context.getMatcher().group(groupIndex);
				if (lineSeparator.equals(tagName)) {
					context.incrementLineNo();
					continue;
				}
				final Tag tag = getTagForPattern(tagName);
				if (tag != null) {
					if (tag.isActive(context)) {
						final String tagDynamicName;
						if (tag.hasDynamicName()) {
							final OutParameter<String> dname = new OutParameter<>();
							extractDynamicName(tag, tagName, dname);
							tagDynamicName = dname.get();
						} else {
							tagDynamicName = null;
						}
						final String parameterValue;
						if (tag.hasParameter()) {
							groupIndex = findFirstGroup(context.getMatcher(), groupIndex);
							final String parameter = Strings.nullToEmpty(context.getMatcher().group(groupIndex));
							final ContentParserInterceptor subInterceptor = new ContentParserInterceptor(context.getParserInterceptor());
							final boolean inBlock = context.setInBlock(false);
							final boolean inParam = context.setInParameter(true);
							parse(parameter, context.getCurrentFile(),
									context.getMatcher().start(groupIndex) + context.getStartIndex(),
									context.getStage(),
									context,
									subInterceptor);
							context.setInParameter(inParam);
							context.setInBlock(inBlock);
							parameterValue = Strings.emptyToNull(subInterceptor.getResult());
						} else {
							parameterValue = null;
						}
						final String blockContent;
						if (tag.isOpeningTag()) {
							groupIndex = findFirstGroup(context.getMatcher(), groupIndex);
							final String tagContent = context.getMatcher().group(groupIndex);
							final ContentParserInterceptor subInterceptor = new ContentParserInterceptor(context.getParserInterceptor());
							final boolean inBlock = context.setInBlock(true);
							final boolean inParam = context.setInParameter(false);
							context.setVisibleInBlock(false);
							parse(Strings.nullToEmpty(tagContent), context.getCurrentFile(),
									context.getMatcher().start(groupIndex) + context.getStartIndex(),
									context.getStage(),
									context,
									subInterceptor);
							context.setInParameter(inParam);
							context.setInBlock(inBlock);
							blockContent = Strings.nullToEmpty(subInterceptor.getResult());
						} else {
							blockContent = null;
						}
						specialTagFound = true;
						try {
							context.getParserInterceptor().tag(context, tag, tagDynamicName, parameterValue, blockContent);
						} catch (Throwable exception) {
							reportError(context, Messages.SarlDocumentationParser_6, tagName, exception);
							return false;
						}
					} else {
						// Ignore the tag for this stage.
					}
				} else {
					reportError(context, Messages.SarlDocumentationParser_1, tagName);
					return false;
				}
			}
			context.getParserInterceptor().closeContext(context);
			return specialTagFound;
		} catch (ParsingException exception) {
			throw exception;
		} catch (Throwable exception) {
			final Throwable rootException = Throwables.getRootCause(exception);
			throw new ParsingException(
					rootException.getClass().getName() + " - " + rootException.getLocalizedMessage(), //$NON-NLS-1$
					context.getCurrentFile(),
					context.getLineNo(),
					rootException);
		}
	}
512729
public void apply(ActionContext context) {
        Boolean hasTemplate = context.hasTemplate();
        if (null != hasTemplate && hasTemplate) {
            RenderTemplate.get(context.successStatus()).apply(context);
            return;
        }
        H.Format fmt = context.accept();
        if (fmt == UNKNOWN) {
            H.Request req = context.req();
            if (req.userAgent().isIE9Down()) {
                fmt = HTML;
            } else {
                H.Method method = req.method();
                String methodInfo = S.concat(method.name(), " method to ");
                String acceptHeader = req.header(H.Header.Names.ACCEPT);
                throw E.unsupport(S.concat(
                        "Unknown accept content type(",
                        acceptHeader,
                        "): ",
                        methodInfo,
                        req.url()));
            }
        }
        Result result = null;
        if (JSON == fmt) {
            List<String> varNames = context.__appRenderArgNames();
            Map<String, Object> map = new HashMap<>(context.renderArgs());
            if (null != varNames && !varNames.isEmpty()) {
                for (String name : varNames) {
                    map.put(name, context.renderArg(name));
                }
            }
            result = new RenderJSON(map);
        } else if (XML == fmt) {
            List<String> varNames = context.__appRenderArgNames();
            Map<String, Object> map = new HashMap<>();
            if (null != varNames && !varNames.isEmpty()) {
                for (String name : varNames) {
                    map.put(name, context.renderArg(name));
                }
            }
            result = new FilteredRenderXML(map, null, context);
        } else if (HTML == fmt || TXT == fmt || CSV == fmt) {
            if (!ignoreMissingTemplate) {
                throw E.unsupport("Template[%s] not found", context.templatePath());
            }
            context.nullValueResultIgnoreRenderArgs().apply(context.req(), context.prepareRespForResultEvaluation());
            return;
        } else if (PDF == fmt || XLS == fmt || XLSX == fmt || DOC == fmt || DOCX == fmt) {
            List<String> varNames = context.__appRenderArgNames();
            if (null != varNames && !varNames.isEmpty()) {
                Object firstVar = context.renderArg(varNames.get(0));
                String action = S.str(context.actionPath()).afterLast(".").toString();
                if (firstVar instanceof File) {
                    File file = (File) firstVar;
                    result = new RenderBinary(file, action);
                } else if (firstVar instanceof InputStream) {
                    InputStream is = (InputStream) firstVar;
                    result = new RenderBinary(is, action);
                } else if (firstVar instanceof ISObject) {
                    ISObject sobj = (ISObject) firstVar;
                    result = new RenderBinary(sobj.asInputStream(), action);
                }
                if (null == result) {
                    throw E.unsupport("Unknown render arg type [%s] for binary response", firstVar.getClass());
                }
            } else {
                throw E.unexpected("No render arg found for binary response");
            }
        }
        if (null != result) {
            ActResponse<?> resp = context.prepareRespForResultEvaluation();
            result.status(context.successStatus()).apply(context.req(), resp);
        } else {
            throw E.unexpected("Unknown accept content type: %s", fmt.contentType());
        }
    }
1091816
function disableContextMenu() {
    // for now just images.
    Array.prototype.forEach.call(document.getElementsByTagName("img"), function(img) {
      img.addEventListener('contextmenu', preventEvent, false);
    });
  }
940500
function isHtmlNode(node) {
        var ns;
        return typeof (ns = node.namespaceURI) == UNDEF || (ns === null || ns == "http://www.w3.org/1999/xhtml");
    }
441872
function safeEndingTags(content) {
  var MJElements = [].concat(WHITELISTED_GLOBAL_TAG);

  (0, _forEach2.default)(_extends({}, _MJMLElementsCollection2.default, _MJMLHead2.default), function (element, name) {
    var tagName = element.tagName || name;

    MJElements.push(tagName);
  });

  var safeContent = (0, _parseAttributes2.default)(MJElements, content.replace(/\$/g, '&#36;'));

  (0, _concat2.default)(_MJMLElementsCollection.endingTags, _MJMLHead.endingTags).forEach(function (tag) {
    safeContent = safeContent.replace(regexTag(tag), _dom2.default.replaceContentByCdata(tag));
  });

  return safeContent;
}
91489
@VisibleForTesting
  static Context parse(String text) {
    Queue<String> parts = Lists.newLinkedList(Arrays.asList(text.split(" ")));
    Context.Builder builder = HTML_PCDATA.toBuilder();
    builder.withState(HtmlContext.valueOf(parts.remove()));
    if (!parts.isEmpty()) {
      try {
        builder.withElType(ElementType.valueOf(parts.element()));
        parts.remove();
      } catch (IllegalArgumentException ex) {
        // OK
      }
    }
    if (!parts.isEmpty()) {
      try {
        builder.withAttrType(AttributeType.valueOf(parts.element()));
        parts.remove();
      } catch (IllegalArgumentException ex) {
        // OK
      }
    }
    if (!parts.isEmpty()) {
      try {
        builder.withDelimType(AttributeEndDelimiter.valueOf(parts.element()));
        parts.remove();
      } catch (IllegalArgumentException ex) {
        // OK
      }
    }
    if (!parts.isEmpty()) {
      try {
        builder.withSlashType(JsFollowingSlash.valueOf(parts.element()));
        parts.remove();
      } catch (IllegalArgumentException ex) {
        // OK
      }
    }
    if (!parts.isEmpty()) {
      try {
        builder.withUriPart(UriPart.valueOf(parts.element()));
        parts.remove();
      } catch (IllegalArgumentException ex) {
        // OK
      }
    }
    if (!parts.isEmpty()) {
      try {
        builder.withUriType(UriType.valueOf(parts.element()));
        parts.remove();
      } catch (IllegalArgumentException ex) {
        // OK
      }
    }
    if (!parts.isEmpty()) {
      String part = parts.element();
      String prefix = "templateNestDepth=";
      if (part.startsWith(prefix)) {
        try {
          builder.withTemplateNestDepth(Integer.parseInt(part.substring(prefix.length())));
          parts.remove();
        } catch (NumberFormatException ex) {
          // OK
        }
      }
    }
    if (!parts.isEmpty()) {
      String part = parts.element();
      String prefix = "jsTemplateLiteralNestDepth=";
      if (part.startsWith(prefix)) {
        try {
          builder.withJsTemplateLiteralNestDepth(Integer.parseInt(part.substring(prefix.length())));
          parts.remove();
        } catch (NumberFormatException ex) {
          // OK
        }
      }
    }
    if (!parts.isEmpty()) {
      throw new IllegalArgumentException(
          "Unable to parse context \"" + text + "\". Unparsed portion: " + parts);
    }
    Context result = builder.build();
    return result;
  }
720318
function(context) {
        var node = this.createElementDefaultNS("FormatList");
        for (var i=0, len=context.formats.length; i<len; i++) {
            var format = context.formats[i];
            node.appendChild(this.createElementDefaultNS(
                "Format",
                format.value,
                (format.current && format.current == true) ?
                    {current: "1"} : null
            ));
        }

        return node;
    }
1109793
function (selector, context) {
    if (typeof selector === 'string') {
      if (context) {
        var cont;
        if (context.jquery) {
          cont = context[0];
          if (!cont) {
            return context;
          }
        } else {
          cont = context;
        }
        return $(cont.querySelectorAll(selector));
      }

      return $(document.querySelectorAll(selector));
    }

    return $(selector, context);
  }
839176
function _getTempElement(context) {
    var tempElement = context._wysihtml5_tempElement;
    if (!tempElement) {
      tempElement = context._wysihtml5_tempElement = context.createElement("div");
    }
    return tempElement;
  }
249791
public static boolean hasNavigableWebContent(
            Context context, AccessibilityNodeInfoCompat node) {
        return (supportsWebActions(node) && isScriptInjectionEnabled(context))
                || hasNativeWebContent(node);
    }
133380
function(context) {
        var node = this.createElementDefaultNS(
            "Layer", null, {
                queryable: context.queryable ? "1" : "0",
                hidden: context.visibility ? "0" : "1"
            }
        );
        
        // required Server element
        node.appendChild(this.write_wmc_Server(context));

        // required Name element
        node.appendChild(this.createElementDefaultNS(
            "Name", context.name
        ));
        
        // required Title element
        node.appendChild(this.createElementDefaultNS(
            "Title", context.title
        ));

         // optional Abstract element
         if (context["abstract"]) {
             node.appendChild(this.createElementDefaultNS(
                 "Abstract", context["abstract"]
             ));
         }

         // optional DataURL element
         if (context.dataURL) {
             node.appendChild(this.write_wmc_URLType("DataURL", context.dataURL));
         }

        // optional MetadataURL element
        if (context.metadataURL) {
             node.appendChild(this.write_wmc_URLType("MetadataURL", context.metadataURL));
        }
        
        return node;
    }
909264
def evaluate(self, context):
        
        html = self._source.format(**context)
        parts = {"text/html": html, "text/plain": textFromHTML(html)}
        return {}, parts
1013910
def scripttag(self, url, path, filename, context):
        
        if msettings['DOCTYPE'] == 'html5':
            markup = """<script src="%s"></script>"""
        else:
            markup = """<script type="text/javascript" charset="utf-8" src="%s"></script>"""
        return markup % self.mkpath(url, path, filename, gzip=self.supports_gzip(context))