jsgui: Attach new policies to entities

Basic implementation. Need to know the type of the policy.