Search Results

Search found 1 results on 1 pages for 'user3522749'.

Page 1/1 | 1 

  • Cannot read property 'onPageChanged' of undefined

    - by user3522749
    sample extension background.js code chrome.runtime.onInstalled.addListener(function() { chrome.declarativeContent.onPageChanged.removeRules(undefined, function() { chrome.declarativeContent.onPageChanged.addRules([{ conditions: [ // When a page contains a <video> tag... new chrome.declarativeContent.PageStateMatcher({ pageUrl: { hostEquals: 'www.youtube.com'} }) ], // ... show the page action. actions: [new chrome.declarativeContent.ShowPageAction() ] }]); }); }); and I got Cannot read property 'onPageChanged' of undefined in console. No problem running the code, why is that happening?

    Read the article

1