-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Missing <!DOCTYPE html> #91
Comments
This is a little tricky unfortunately. If you try to simply add Error in Chrome
Error in Firefox
In the We could create a doctype declaration like this: document.implementation.createDocumentType('html', '-//W3C//DTD XHTML 1.0 Transitional//EN', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdd'); So we could just check if |
If doing ^ we'll still get errors like:
From function attr(node, attribute, value) {
if (value == null)
node.removeAttribute(attribute);
else if (node.getAttribute(attribute) !== value)
node.setAttribute(attribute, value);
} |
You can't run test ^ in the consoledocument.implementation.createDocumentType('html', '-//W3C//DTD XHTML 1.0 Transitional//EN', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdd'); vs document.createElement('div'); We can check that we have an Add new func around line 231: function doctype_element(name) {
return document.implementation.createDocumentType('html', '-//W3C//DTD XHTML 1.0 Transitional//EN', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdd');
} Check that you have an HTMLElement around line 262 function attr(node, attribute, value) {
if (node instanceof HTMLElement) {
if (value == null)
node.removeAttribute(attribute);
else if (node.getAttribute(attribute) !== value)
node.setAttribute(attribute, value);
}
} Update line 353: return svg ? svg_element(name) : name === '!DOCTYPE' ? doctype_element(name) : element(name); |
I'll chime in here (uninvited :)). When adding the Jim, you might have excellent reasons for the You know your aims and internals far better than me, but those components - the Would a reserved file artifact - say,
Note that you already have "be careful" language around the global IDK maybe this is too naive, but I think it would eliminate a possible WTF that we face right out of the box, put the emphasis on userland components (which is what you're driving at), and allow Plenti to easily support any crazy combination of With respect... |
Everyone is invited to chime in! I always appreciate the feedback :). These are really good points @netaisllc, and you're echoing the advice provided by the Svelte core team regarding the related hydration issue: #76. These problems stem from trying to hydrate the full dom instead of setting an entrypoint and hydrating the body or some sub element like you suggest. I'm probably being overly stubborn about this implementation detail, but I'm shooting for a dev experience that feels like a traditional SSG where you only have to worry about content and templates. I'm not sure it's quite there with the current implement either, I'll need to think on this a bit... Thanks for the insights, your approach might ultimately be where we end up. |
Issues related to
|
Temp solution is to inject |
The temporary fix is incorporated in v0.5.1. You can eject |
This should be included with the default starter.
The text was updated successfully, but these errors were encountered: