Home > Enterprise >  How can I determine which parameters are allowed in a HTML tag?
How can I determine which parameters are allowed in a HTML tag?

Time:06-03

I have an assessment to make, but I am not sure whether or not this question is using the wrong terms? Because I feel like it should ask me which attributes are allowed, or am I just clueless?

Here is the literal translation of the question:

In Laravel Blade you see the following code:

 <x-form name="myform" id="1"></x-form>

How do you determine which other parameters are allowed in this HTML tag?

I was thinking a querySelector can be useful here, but I am not sure.

CodePudding user response:

As this is a Laravel component basically you are allowed unlimited attributes in components because it totally depends on your logic. The number of attributes you define in your component class can be used here. You can get more information on Laravel documentation.

https://laravel.com/docs/9.x/blade#components

CodePudding user response:

The trick in this question is that it tests your knowledge about Blade Components. So the valid answer will be: <x-form> is custom Blade Component, so i will go into default components directory (which is App\View\Components) and see the definition of the component with all valid attributes.

  • Related