WordPress Developer Hours: Introduction to the HTML API

Поділитися
Вставка
  • Опубліковано 21 лип 2024
  • WordPress has been upping its HTML game, and the new HTML API is enabling new ways of reliably working with and modifying HTML.
    Maybe you know this vicious cycle: ever-expanding regular expression patterns, HTML edge cases, and growing complexity of matching code ends up obscuring what you set out to do in the first place, and still isn't reliable. Let's talk about how this game is changing, what we can do today, and what is coming in the near future.
    We'll start with some quick demos of using the new HTML API interfaces, then briefly discuss some of the limits of the new systems, and finish with a time for questions and discussion, so bring your curiosity.
    Topics covered:
    - What can the HTML API do today?
    - What will the HTML API be able to do with the 6.4 release?
    - When is the HTML API not appropriate?
    - How fast and efficient is the HTML API?
    - How reliable is the HTML API?
    ___________________________________________
    View this video and others on WordPress.TV: wordpress.tv/2023/08/31/devel...
    ___________________________________________
    Links from the video:
    - WP_HTML_Tag_Processor Documentatation: developer.wordpress.org/refer...
    - HTML API Progress Report: make.wordpress.org/core/2023/...
    - HTML API component overview: make.wordpress.org/core/compo...
    - Follow the development: core.trac.wordpress.org/query...
    ___________________________________________
    0:00:00 - Introduction
    0:06:17 - The HTML problem explained
    0:08:56 - Demonstrating the problem with REGEX
    0:13:57 - Demonstrating the problem with DOMDocument
    0:14:44 - Introducing the Tag Processor
    0:21:00 - Does it use REGEX?
    0:24:55 - How do you iterate through multiple tags that are the same?
    0:33:20 - Can the Tag Processor find custom elements?
    0:36:30 - Introducing the HTML Processor
    0:38:50 - Performance implications
    0:43:18 - Replacing/inserting tags
    0:50:53 - HTML comments
    0:55:44 - Will the HTML Parser be block aware?
    0:57:36 - Following the development
    0:59:15 - Wrap up

КОМЕНТАРІ • 3

  • @perezcarreno
    @perezcarreno 10 місяців тому +1

    This is great stuff, thanks! I wasn't aware of the HTML API!

  • @dominikliss
    @dominikliss 2 місяці тому

    This will save me a ton of time! Thank you Dennis 😊

  • @RakibulIslam-cp8oi
    @RakibulIslam-cp8oi 8 місяців тому +1

    Superb