The Chrome browser supports Web Components and I would like to add a number of them in WordpPress pages, but using the queuing mechanism as in the case of the functions wp_enqueue_script and wp_enqueue_style for scripts and styles.

Anyone out there can help me?

If there is no ready function to do this a suggestion of how to implement this in PHP would be welcome.

  • 1
    There is no enqueuing feature for link tags, generally you would just add them to your theme's header directly, or output them in a function hooked to wp_head. – Otto Dec 21 '14 at 18:04
  • Ok @Otto but I need a best practice advice to write a Class which extends WP_Dependencies class (from wp-includes/class.wp-dependencies.php) to manage the <link rel="import" ...> tag to load a component properly. – João Paraná Dec 21 '14 at 18:30
  • With something like wp_enqueue_html('my-tabs') I can manage component load which is referenced somewhere in my plugin or theme code. In this case, the wp_enqueue_html function must be render something like <link rel="import" href="my-tabs.html"> where my-tabs.html implements my tabs WEB Component. – João Paraná Dec 21 '14 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.