Skip to content
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

[Vue warn]: Template compilation error: Tags with side effect (<script> and <style>) are ignored in client component templates. #32

Closed
netdjw opened this issue May 7, 2021 · 1 comment

Comments

@netdjw
Copy link

netdjw commented May 7, 2021

Hi there!

I just started using this package, and run into this warning in Google Chorme console:

[Vue warn]: Template compilation error: Tags with side effect (<script> and <style>) are ignored in client component templates.
5  |          <input type="hidden" name="widget_form_id" value="1">
6  |  
7  |          <script>
8  |                  window.addEventListener('load', () => {
9  |                      setTimeout(() => {
10 |                          document.querySelectorAll('input[data-purpose="honey_javascript"]')
11 |                              .forEach(input => {
12 |                                  if (input.value.length > 0) {
13 |                                      return;
14 |                                  }
15 |                                  
16 |                                  input.value = "here is my key string";
17 |                                  input.dispatchEvent(new Event('change'));
18 |                              });
19 |                      }, 3000)
20 |                  });
21 |              </script>
  at <App>

My .blade.php file looks like this:

    <form action="/" method="post">
        @csrf
        <x-honey />
        <x-honey-recaptcha />
        ....
    </form>

This blade file is returned as view, and this view is inserted into the body element of HTML DOM.

Any idea?

@swilla
Copy link
Contributor

swilla commented Apr 8, 2022

@netdjw I created a PR that fixes this.

lukeraymonddowning added a commit that referenced this issue Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants