When creating the page scripts within UI builder, servicenow doesn't allow you to use Web API (except console and timeout), hence you are not able to access document or window objects. One neat trick ...
Interested in our other ServiceNow Hacktoberfest projects? See the main repository here or see our official blog post here. Note: ServiceNowDevProgram has many repositories that can be imported ...