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
<py-config> reference improvements #1006
Comments
Agreed! I tried to break the wall of text a bit in this PR #982 Also added tutorials specifically for fetch and runtimes. If you have time can you check the PR? |
It was initially inside Tagging @antocuni for this part of the discussion |
Assigning myself |
it still needs to be in The fact that it's a custom element or not it's irrelevant: custom elements cannot turn invalid HTML into valid HTML. |
Adding on to antonio, the result of including a custom element in a tag seems to be that the head is immediately closed, and that custom element tag and any following tags are dumped into the : <head>
<title>Hello world</title>
<py-script id="InHead"></py-script>
<meta charset="utf-8">
</head>
<body>
<p>Hello, world!</p>
</body> becomes: <head>
<title>Hello world</title>
</head>
<body>
<py-script id="InHead"></py-script>
<meta charset="utf-8">
<p>Hello, world!</p>
</body> Upon rendering. (*at least in Chrome, Edge, Firefox). So, no custom elements in - they'll end up in the body anyway, possibly with unintended consequences. |
Wait, I'm not sure I understand..... |
@fpliger Apologies, I got sloppy with my terminology. I should say any "non-typical" tags for... some version of typical? Not entirely sure what the standard is or what the canonical list of tags allowed in <head> is, But the behavior above is the same if you use |
Digging a little deeper, I believe this behavior is captured by HTML Spec Section 13.2.6.4.4 - the "in head" insertion mode. If I'm reading that section right, any tag not named Lots of edge cases in both those modes around closing tags, templates, |
Checklist
What happened?
Capturing a few things that got my attention while reading the reference page:
The <py-config> element should be placed within the <body> element.
but I don't think it's correct. It was when<py-config>
was a Custom Element but it is not anymore.Examples
section encompasses a lot of value information that is kind of hidden within the examples comments. It ends up being a big wall of text that is not that useful unless I read the entire section (not users are there to read everything and often want to look for the minimum amount of info to solve their problem. I think that splitting the Examples part into smaller sections accompanied with contextual examples with be more useful. For instance, splitting into :Defining an inline config
,Defining a file based config
,Mixing inline and file based configs
,TOML vs. JSON Configs
or something along these lines would help the user navigate what they are looking for[[fetch]]
and[[runtime]]
. Imho we are leaving users with a lot of questions and guesses on these 2What browsers are you seeing the problem on? (if applicable)
No response
Console info
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: