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

Customizable Attribute Name for @selector Lookups #1022

Closed
wants to merge 1 commit into from

Conversation

Rikaelus
Copy link

This adds support for an optional DUSK_HTML_ATTRIBUTE setting for attribute names besides "dusk" within HTML.

Benefits

W3C Compliancy

This will provide a way to achieve W3C compliancy as discussed here and specified here with data- prefixes.

DUSK_HTML_ATTRIBUTE=data-dusk

Transition Support

The attribute can be changed easily during transitory periods where there might be multiple testing engines acting against the same website.

Reduced Exposure

This will allow a more generic attribute name to be chosen to prevent exposing the use of Dusk, Laravel, and PHP to the world. This can help reduce the attack surface for hackers.

Backwards Compatibility

Because the absence of the DUSK_HTML_ATTRIBUTE results in the "dusk" default being used, default behavior should be completely unaffected.

Note

This also achieves the goal sought in #1012 but achieves it through customization rather than by adding static support for data-dusk as a simultaneous attribute to dusk. As such it's a little less invasive while also offering greater flexibility.

@taylorotwell
Copy link
Member

Here you go: cf04717

@pataar
Copy link
Contributor

pataar commented Feb 2, 2023

Here you go: cf04717

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants