Samsung smart-TV javascript app security-Collection of common programming errors

Tried searching a lot for this, no luck so far. Maybe someone has an idea about it, that would be appreciated. When deploying a javascript/html app to the TV (SAMSUNG), is the code compiled somehow? Can the user crawl into the code and change it? ( like doing with google chrome debugger ). I need some form of security / validation that is client sided, but I’m new with this and not sure if it’s safe. Best regards.