[wp-trac] [WordPress Trac] #61387: Interactivity API: not working in classic theme
WordPress Trac
noreply at wordpress.org
Thu Jun 6 09:09:02 UTC 2024
#61387: Interactivity API: not working in classic theme
-------------------------------+-----------------------------
Reporter: swissspidy | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Interactivity API | Version: 6.5
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
I'm probably missing something, but... I am trying to leverage the
interactivity API in a plugin with a custom block. Add `viewScriptModule`
and `supports.interactivity` to `block.json` accordingly and it works fine
— but only in a block theme.
In a classic theme, there is no `modulepreload` for the
`@wordpress/interactivity` module, so naturally my script doesn't work and
throws an error because of the missing module.
I've tested with classic themes such as Twenty Fifteeen and Twenty
Sixteen. It doesn't work there.
Twenty Twenty-Four works just fine.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61387>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list