Skip to content

example.html doesn't work. . . #27

@sandynomad

Description

@sandynomad

Using Chrome 109.0.5414.87; Firefox 110.0b2 (64-bit); Safari 16.0:

Using "example.html" as is:

Uncaught SyntaxError: import declarations may only appear at top level of a module
Uncaught ReferenceError: Autocomplete is not defined
     <anonymous> file:///...../bootstrap-5-autocomplete/example/example.html:23

When using a web server I believe the "import declarations" can be fixed by changing:

<script src="../autocomplete.js"></script>

to

<script type="module" src="../autocomplete.js"></script>

However, trying to access "Autocomplete" from javascript in the main document (<script> inside <body>) still returns "Autocomplete is not defined".

Suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions