New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide cross-browser node containment checking #7033

Merged
merged 1 commit into from Jun 1, 2018
Jump to file or symbol
Failed to load files and symbols.
+11 −0
Diff settings

Always

Just for now

Copy path View file
@@ -150,6 +150,13 @@ function gutenberg_register_scripts_and_styles() {
filemtime( gutenberg_dir_path() . 'build/dom/index.js' ),
true
);
wp_add_inline_script(
'wp-dom',
gutenberg_get_script_polyfill( array(
'document.contains' => 'node-contains',
) ),
'before'
);
wp_register_script(
'wp-utils',
gutenberg_url( 'build/utils/index.js' ),
@@ -560,6 +567,10 @@ function gutenberg_register_vendor_scripts() {
'formdata',
'https://unpkg.com/formdata-polyfill@3.0.9/formdata.min.js'
);
gutenberg_register_vendor_script(
'node-contains',
'https://unpkg.com/polyfill-library@3.26.0-0/polyfills/Node/prototype/contains/polyfill.js'
);
}
/**
ProTip! Use n and p to navigate between commits in a pull request.