<commit_before>package com.vaadin.polymer.elemental;

import static jsinterop.annotations.JsPackage.GLOBAL;

import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import elemental2.dom.HTMLElement;

@JsType(isNative=true, namespace=GLOBAL, name="HTMLElement")
public class PolymerHTMLElement extends HTMLElement {
    /**
     * Polymer’s custom property shim evaluates and applies custom property values once at element creation time.
     * In order to have an element (and its subtree) re- evaluate custom property values due to dynamic changes
     * such as application of CSS classes, etc., call updateStyles().
     */
    public native void updateStyles();

    @JsProperty public native HTMLElement getRoot();

    public native void debounce(String name, Function f, int timeout);
}<commit_msg>Adding helper methods to PolymerHTMLElement base class<commit_after>package com.vaadin.polymer.elemental;

import static jsinterop.annotations.JsPackage.GLOBAL;

import elemental2.dom.HTMLElement;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsType;

@JsType(isNative=true, namespace=GLOBAL, name="HTMLElement")
public class PolymerHTMLElement extends HTMLElement {

    /** Properties and methods added by Polymer API **/
    public HTMLElement root;
    public native void debounce(String name, Function f, int timeout);
    /**
     * Polymer’s custom property shim evaluates and applies custom property values once at element creation time.
     * In order to have an element (and its subtree) re- evaluate custom property values due to dynamic changes
     * such as application of CSS classes, etc., call updateStyles().
     */
    public native void updateStyles();

    /** Missing properties in elemental2.dom.Element **/
    public String textContent;

    /** Helper methods **/
    @SuppressWarnings("unchecked")
    @JsOverlay public final <T> T cast() {
      return (T) this;
    }

    @SuppressWarnings("unchecked")
    @JsOverlay public static final <T extends PolymerHTMLElement>T as(Object o) {
      return (T) o;
    }

}
{'fraction_non_alphanumeric': 0.08301526717557252, 'fraction_numerical': 0.0014312977099236641, 'mean_word_length': 4.177777777777778, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2272183', 'n_tokens_mistral': 568, 'n_tokens_neox': 569, 'n_words': 201}