Closed createdbypete closed 3 years ago
:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:
I'm receiving the same error.
When I access some file by controllers and inspect the page I see the \<!DOCTYPE html>, but using LiveView it doesn't appear.
mix.exs:
defp deps do
[
{:phoenix, "~> 1.5.0"},
{:phoenix_pubsub, "~> 2.0"},
{:phoenix_ecto, "~> 4.0"},
{:ecto_sql, "~> 3.0"},
{:postgrex, ">= 0.0.0"},
{:phoenix_html, "~> 3.3"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:gettext, "~> 0.11"},
{:jason, "~> 1.0"},
{:plug_cowboy, "~> 2.5"},
{:hound, "~> 1.1.1"},
{:phoenix_live_view, "~> 0.17.7"}
]
end
LiveView file:
defmodule Sneakers23Web.TemperaturePageLive do
use Phoenix.LiveView
def render(assigns) do
~H"""
Current temperature: <%= @temperature %>°F
<button phx-click="inc_temperature">+</button>
"""
end
def mount(_params, _session, socket) do
socket = assign(socket, :temperature, 23)
{:ok, socket}
end
end
In Firefox:
In Chrome:
Chrome (Version 94.0.4606.71 (Official Build) (x86_64)) is reporting an issue in dev tools due to missing DOCTYPE.
The issue nor this suggested fix appears to impact live reload in anyway beyond removing the report in Chrome dev tools.