<commit_before>/* See license.txt for terms of usage */

"use strict";

var self = require("sdk/self");

const { Css } = require("../core/css.js");

// Module implementation 
var Dom = {};

Dom.clearNode = function(node) {
    node.textContent = "";
};

Dom.eraseNode = function(node) {
    while (node.lastChild)
        node.removeChild(node.lastChild);
};

Dom.getAncestorByClass = function(node, className)
{
    for (var parent = node; parent; parent = parent.parentNode) {
        if (Css.hasClass(parent, className))
            return parent;
    }

    return null;
};

// Exports from this module
exports.Dom = Dom;
<commit_msg>Remove Dom.eraseNode (use Dom.clearNode)<commit_after>/* See license.txt for terms of usage */

"use strict";

var self = require("sdk/self");

const { Css } = require("../core/css.js");

// Module implementation 
var Dom = {};

Dom.clearNode = function(node) {
    node.textContent = "";
};

Dom.getAncestorByClass = function(node, className)
{
    for (var parent = node; parent; parent = parent.parentNode) {
        if (Css.hasClass(parent, className))
            return parent;
    }

    return null;
};

// Exports from this module
exports.Dom = Dom;

{'fraction_non_alphanumeric': 0.14786967418546365, 'fraction_numerical': 0.0, 'mean_word_length': 3.0887372013651877, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6091127', 'n_tokens_mistral': 385, 'n_tokens_neox': 385, 'n_words': 98}