1

function getXMLListMatches() {
var URL = 'http://www.nowgoal.group/gf/data/goal8.xml';
let getistMatches = request(URL, function (err, res, body) {
if (err) throw err;
let a = parseString(body, function (err, result) {
    let resultsBody = result['c']['ids'][0].split(',').slice(0, -1);
    console.log(resultsBody)
    return resultsBody
    });
    return a;
});
return getistMatches;
};

let a = getXMLListMatches()
console.log(a)

Никак не могу разобраться, почему не могу получить переменную resultsBody в итоге. return возвращает либо ничего, либо ошибку.введите сюда описание изображения

2
  • А что у вас отображается в логе?
    – karvetskiy
    19 дек 2019 в 6:55
  • @karvetskiy я отредактировал вопрос и добавил скриншот 19 дек 2019 в 7:06

1 ответ 1

0

Попробуйте изменить правила Content Security Policy в файле manifest, добавив style-src 'self' 'unsafe-inline':

"content_security_policy": "default-src 'self' style-src 'self' 'unsafe-inline';" 

Это позволит использовать inline стиль.

Оригинал: https://stackoverflow.com/questions/17766817/refused-to-apply-inline-style-because-it-violates-the-following-content-security

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.