Skip to content

Don't use href=javascript:void(0); #110

@beders

Description

@beders

Version & browser

latest, Chrome

Which component

Tab.vue

Steps to reproduce the problem

Using Vue.js as part of a content script of a Chrome extension

Expected behavior

Clicking on tabs worls

Actual behavior

The browser reacts with:

Refused to execute JavaScript URL because it violates the following Content Security Policy directive: "script-src 'nonce-7KNpzGeQYX1h0reeYVinWIEtxQ0' 'strict-dynamic' 'unsafe-eval' 'unsafe-inline' https: 'report-sample'". Note that 'unsafe-inline' is ignored if either a hash or nonce value is present in the source list.

While this could be worked around with, it would be much better to simply replace this with href="#" if possible.

That way no CSP checks are triggered.

Oh and: Thank you for making this library! Saved me a lot of time!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions