@Grundy, помимо кода, который и не видно одни ошибки:
{
"message": "Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag.",
"filename": undefined,
"lineno": undefined,
"colno": undefined
}
{
"message": "Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag.",
"filename": undefined,
"lineno": undefined,
"colno": undefined
}
2018-10-31T09:19:04.463Z: Page is iframe: https://stacksnippets.net/js