MAIN // 
Transforms a `event` doclet element.

@param {Object} node - doclet element
@returns {Object} filtered object
552357
function transform( node ) {
	var out;
	out = {
		'name': node.name,
		'description': node.description || '',
		'extends': node.augments || [],
		'fires': node.fires || '',
		'constructor': {
			'name': node.name,
			'description': node.description
		},
		'access': node.access || '',
		'virtual': !!node.virtual
	};
	if ( node.examples ) {
		out.constructor.examples = transformExamples( node.examples );
	} else {
		out.constructor.examples = [];
	}
	if ( node.params ) {
		out.constructor.parameters = transformParams( node.params );
	} else {
		out.constructor.parameters = [];
	}
	return out;
}
783271
function (node) {

			// Does this node have a body? If so we can replace its contents.
			if (node.body && node.body.length) {
				node.body =
					[].slice.call(node.body, 0)
					.reduce(function(body, node) {

						if (!~allowedPrepend.indexOf(node.type))
							return body.concat(node);

						id++;
						sourceMapAdd(id, node, true);

						return body.concat(
							expressionStatement(
								callExpression(filetag, id)
							),
							node
						);

					}, []);
			}

			if (node.noReplace)
				return;

			// If we're allowed to replace the node,
			// replace it with a Call Expression.

			if (~allowedReplacements.indexOf(node.type))
				return (
					id ++,
					sourceMapAdd(id, node, false),
					callExpression(filetag, id, node)
				);
		}
657068
function transform(value) {
	if(typeof value === 'function') value = value()
  if(value instanceof Array) {
    var el = document.createDocumentFragment()
    value.map(item => el.appendChild(transform(item)))
    value = el
  } else if(typeof value === 'object') {
		if(typeof value.then === 'function') {
			var tmp = document.createTextNode('')
			value.then(function(data) {
				tmp.parentElement.replaceChild(transform(data), tmp)
			})
			value = tmp
		} else if(typeof value.on === 'function') {
			var tmp = document.createTextNode('')
			value.on('data', function(data) {
				// need to transform? Streams are only text?
				tmp.parentElement.insertBefore(document.createTextNode(data), tmp)
			})
			value = tmp
		}
	} else value = document.createTextNode(value)
	return value
}
710383
function getNodeEvents(node, name = null, fn = null) {
    const cache = (node[uid] = node[uid] || []);
    const data = { all: cache, evt: null, found: null};
    if (name && fn && utils.size(cache) > 0) {
        each(cache, (cl, i) => {
            if (cl.eventName == name && cl.fn.toString() == fn.toString()) {
                data.found = true;
                data.evt = i;
                return false;
            }
        })
    }
    return data;
}
853540
function(node, eventName, handler) {
        if (this.recognizers[eventName]) {
            this.teardownGesture(node, eventName);
        }
        node.removeEventListener(eventName, handler);
    }
1223490
function transformTemplateElement (node) {
    const originalValue = node.value.value.raw
    if (rootPathWithDotRegex.test(originalValue)) {
      node.value.value.raw = node.value.value.raw.replace(
        rootPathWithDotRegex,
        '$$$1'
      )
    }
  }
219436
public void convert(org.jsoup.nodes.Document in, Document out) {
        if (!StringUtil.isBlank(in.location()))
            out.setDocumentURI(in.location());

        org.jsoup.nodes.Element rootEl = in.child(0); // skip the #root node
        NodeTraversor.traverse(new W3CBuilder(out), rootEl);
    }
1225660
function(doc) {
    this._removeNodes(doc.getElementsByTagName('script'), function(scriptNode) {
      scriptNode.nodeValue = "";
      scriptNode.removeAttribute('src');
      return true;
    });
    this._removeNodes(doc.getElementsByTagName('noscript'));
  }
424159
function transform( node ) {
	var type;
	if ( node.type ) {
		if ( node.type.length === 1 ) {
			type = node.type[ 0 ];
		} else {
			type = node.type;
		}
	} else {
		type = '';
	}
	return {
		'name': node.name,
		'description': node.description || '',
		'type': type,
		'access': node.access || '',
		'virtual': !!node.virtual
	};
}
325853
function transformForIn(node, path) {
        var label = node.$label;
        delete node.$label;
        var idx = ident(generateSymbol("idx"));
        var inArray = ident(generateSymbol("in"));
        var declVars = parsePart("var $0,$1 = [];for ($0 in $2) $1.push($0)", [idx,
            inArray,node.right]).body;
        var loop = parsePart("for ($0; $1.length;){ $2 = $1.shift(); $:3 ; }", [node.left,
            inArray,node.left.type === 'VariableDeclaration' ? node.left.declarations[0].id : node.left,
            node.body]).body[0];
        loop.$label = label;
        for (var b = 0;b < path.length; b++) {
            if (examine(path[b].parent).isBlockStatement) {
                path[b].parent[path[b].field].splice(path[b].index, 0, declVars[0], declVars[1]);
                break;
            }
        }
        coerce(node, loop);
    }
1300076
function onDomEvent (node, eventName, callback) {
		node.addEventListener(eventName, callback, false);
		return {
			remove: function () {
				node.removeEventListener(eventName, callback, false);
				node = callback = null;
				this.remove = this.pause = this.resume = function () {};
			},
			pause: function () {
				node.removeEventListener(eventName, callback, false);
			},
			resume: function () {
				node.addEventListener(eventName, callback, false);
			}
		};
	}
1086869
function processNode(node) {
            const openBrace = node.expressionStart
            const closeBrace = node.expressionEnd

            const interpolate = node.code

            const entity = interpolate.trim()
            if (!entity) {
                return
            }
            const firstCharIndex =
                openBrace.range[1] + interpolate.indexOf(entity)
            const lastCharIndex = firstCharIndex + entity.length

            const actualOpenSpaces = firstCharIndex - openBrace.range[1]
            const actualCloseSpaces = closeBrace.range[0] - lastCharIndex
            const expectedSpaces = options === "always" ? 1 : 0
            if (
                expectedSpaces !== actualOpenSpaces &&
                equalLine(openBrace.range[1], firstCharIndex)
            ) {
                context.report({
                    node: openBrace,
                    messageId: getMessageIdForTagOpen(
                        expectedSpaces,
                        actualOpenSpaces
                    ),
                    data: {
                        chars: openBrace.chars,
                        n: actualOpenSpaces,
                    },
                    fix(fixer) {
                        const range = [openBrace.range[1], firstCharIndex]
                        const text = " ".repeat(expectedSpaces)
                        return fixer.replaceTextRange(range, text)
                    },
                })
            }
            if (
                expectedSpaces !== actualCloseSpaces &&
                equalLine(lastCharIndex, closeBrace.range[0])
            ) {
                context.report({
                    node: closeBrace,
                    messageId: getMessageIdForTagClose(
                        expectedSpaces,
                        actualCloseSpaces
                    ),
                    data: {
                        chars: closeBrace.chars,
                        n: actualCloseSpaces,
                    },
                    fix(fixer) {
                        const range = [lastCharIndex, closeBrace.range[0]]
                        const text = " ".repeat(expectedSpaces)
                        return fixer.replaceTextRange(range, text)
                    },
                })
            }
        }
599181
function element(node, options = {}) {
  const { namespace } = options;
  const { tagName, properties, children = [] } = node;
  const el = typeof namespace !== 'undefined'
    ? document.createElementNS(namespace, tagName)
    : document.createElement(tagName);

  // Add HTML attributes
  const props = Object.keys(properties);
  const { length } = props;
  for (let i = 0; i < length; i += 1) {
    const key = props[i];
    const {
      attribute,
      property,
      mustUseAttribute,
      mustUseProperty,
      boolean,
      booleanish,
      overloadedBoolean,
      // number,
      // defined,
      commaSeparated,
      spaceSeparated,
      // commaOrSpaceSeparated,
    } = info.find(info.html, key) || {
      attribute: key,
      property: key,
    };

    let value = properties[key];
    if (Array.isArray(value)) {
      if (commaSeparated) {
        value = value.join(', ');
      } else if (spaceSeparated) {
        value = value.join(' ');
      } else {
        value = value.join(' ');
      }
    }

    try {
      if (mustUseProperty) {
        el[property] = value;
      }
      if (boolean || (overloadedBoolean && typeof value === 'boolean')) {
        if (value) {
          el.setAttribute(attribute, '');
        } else {
          el.removeAttribute(attribute);
        }
      } else if (booleanish) {
        el.setAttribute(attribute, value);
      } else if (value === true) {
        el.setAttribute(attribute, '');
      } else if (value || value === 0 || value === '') {
        el.setAttribute(attribute, value);
      }
    } catch (e) {
      if (!mustUseAttribute && property) {
        el[property] = value;
      }
      // Otherwise silently ignore
    }
  }

  // Transform children
  const { length: childrenLength } = children;
  for (let i = 0; i < childrenLength; i += 1) {
    const childEl = transform(children[i], options);
    if (childEl) {
      el.appendChild(childEl);
    }
  }

  return el;
}
854175
private void transformTextNode(Node node) {

        // only do some output if we are in writing mode
        if (m_write) {
            String helpString = node.getNodeValue();
            m_tempString.append(helpString);
        }
    }
523589
function serializeDocumentFragment (node, context, eventTarget) {
  return exports.serializeNodeList(node.childNodes, context, null, eventTarget);
}
468369
function onclick(event) {
			autoDismissNodes.forEach(function(autoDismissNode) {
				var excludeNodeInDocument = false;
				var excluded = autoDismissNode.excludeNodes.some(function(excludeNode) {
					if(document.body.contains(excludeNode)) {
						excludeNodeInDocument = true;
						return excludeNode.contains(event.target);
					}
					return false;
				});
				if (excludeNodeInDocument && !excluded) {
					try {
						autoDismissNode.dismiss(event);
					} catch (e) {
						if (typeof console !== "undefined" && console) { //$NON-NLS-0$
							console.error(e && e.message);
						}
					}
				}
			});
			autoDismissNodes = autoDismissNodes.filter(function(autoDismissNode) {
				// true if at least one excludeNode is in document.body
				return autoDismissNode.excludeNodes.some(function(excludeNode) {
					return document.body.contains(excludeNode);
				});
			});
		}
290967
function (node, args) {
          var self = this, impl, doc, oldDoc, htmlSerializer, content, rootNode;

          // Explorer won't clone contents of script and style and the
          // selected index of select elements are cleared on a clone operation.
          if (Env.ie && dom.select('script,style,select,map').length > 0) {
            content = node.innerHTML;
            node = node.cloneNode(false);
            dom.setHTML(node, content);
          } else {
            node = node.cloneNode(true);
          }

          // Nodes needs to be attached to something in WebKit/Opera
          // This fix will make DOM ranges and make Sizzle happy!
          impl = document.implementation;
          if (impl.createHTMLDocument) {
            // Create an empty HTML document
            doc = impl.createHTMLDocument("");

            // Add the element or it's children if it's a body element to the new document
            each(node.nodeName == 'BODY' ? node.childNodes : [node], function (node) {
              doc.body.appendChild(doc.importNode(node, true));
            });

            // Grab first child or body element for serialization
            if (node.nodeName != 'BODY') {
              node = doc.body.firstChild;
            } else {
              node = doc.body;
            }

            // set the new document in DOMUtils so createElement etc works
            oldDoc = dom.doc;
            dom.doc = doc;
          }

          args = args || {};
          args.format = args.format || 'html';

          // Don't wrap content if we want selected html
          if (args.selection) {
            args.forced_root_block = '';
          }

          // Pre process
          if (!args.no_events) {
            args.node = node;
            self.onPreProcess(args);
          }

          // Parse HTML
          content = Zwsp.trim(trim(args.getInner ? node.innerHTML : dom.getOuterHTML(node)));
          rootNode = htmlParser.parse(content, args);
          trimTrailingBr(rootNode);

          // Serialize HTML
          htmlSerializer = new Serializer(settings, schema);
          args.content = htmlSerializer.serialize(rootNode);

          // Post process
          if (!args.no_events) {
            self.onPostProcess(args);
          }

          // Restore the old document if it was changed
          if (oldDoc) {
            dom.doc = oldDoc;
          }

          args.node = null;

          return args.content;
        }