Home>
I want to achieve

A color picker called the JavaScript library "md-color-picker".append ()I want to add by

"How to use introduction blog"
https://pisuke-code.com/jquery-how-to-use-md-color-picker/

"Official github"
https://github.com/BennyAlex/material-design-inspired-color-picker

"Official demo"
https://bennyalex.github.io/material-design-inspired-color-picker/

Corresponding source code

thishtmlPickerIs the HTML posted on the above "How to use blog".append ()Will result in an error.

var htmlPicker = `<md-color-picker color-margin =" 6 "colors-per-row =" 5 "color-size =" 40 "default-tint =" 500 "fixMinHeight =" true "palette =" material- full "use-spectrum-picker =" true "value =" # 2196f3 "><md-color-picker>`;
$('body'). Prepend (picker);

If i copy and paste the error, it will look like this.
In short, there seems to be a problem with the following in this library, but it cannot be deciphered by an advanced library.
The meaning of the notation "render" or "it" instead of "number of error lines" is also unknown.

TypeError: e.value is undefined
    render http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    it http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1render http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    _render http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    r http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    get http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    po http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    we http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    $mount http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    init http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    l http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    c http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    ma http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    _update http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    r http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    get http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    po http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    we http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    $mount http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    _init http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    Ct http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    or http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    connectedCallback http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1n http://example.com/wp-content/themes/testTheme/js/md-color-picker.js?ver=1.7.2/1
    jQuery 3
     debugger eval code: 2
What I tried

Of the above source codehtmlPickerIs the HTML of "How to use introduction blog", but the same error occurred in the simple HTML of Usage of "Official github" as shown below.

var htmlPicker = `<md-color-picker></md-color-picker>`;
$('body'). Prepend (htmlPicker);


Also.append ()Not.prepend ()Was the same.

And with the "Edit as HTML" function of the development tool, the abovehtmlPickerIt worked normally when I put in.

In addition, it was an error not only from JavaScript but also from normal HTML solid writing.

Tool version

In jQuery 3.4.1, the library is 1.7.2.
I don't think it has anything to do with it, but it's WordPress.

I want to add this color picker inside the specified HTML with a button click, so by all means.append ()I think it is necessary to add it in, how can I do it?

Supplement

This is a reproduction sample of the above error.
Thank you.
https://jsfiddle.net/t804c9sw/