Packages
A module to decode HTML into a tree, porting all properties of the underlying library myhtml, being fast and correct in regards to the html spec.
Current section
Files
Jump to
Current section
Files
lib/myhtmlex/nif.ex
defmodule Myhtmlex.Nif do
@moduledoc false
@on_load { :init, 0 }
app = Mix.Project.config[:app]
def init do
path = :filename.join(:code.priv_dir(unquote(app)), 'myhtmlex')
:ok = :erlang.load_nif(path, 0)
end
def decode(bin)
def decode(_), do: exit(:nif_library_not_loaded)
def decode(bin, flags)
def decode(_, _), do: exit(:nif_library_not_loaded)
def open(bin)
def open(_), do: exit(:nif_library_not_loaded)
def decode_tree(tree)
def decode_tree(_), do: exit(:nif_library_not_loaded)
def decode_tree(tree, flags)
def decode_tree(_, _), do: exit(:nif_library_not_loaded)
end