Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titlepopup.js
    document.addEventListener('DOMContentLoaded', function() {
        var chromeDb = Tornevall_ChromeDB();
        if (chromeDb.openDatabase('TornevallFacebookFilterMyExample', '1.2.0.0', 'Tornevall Networks Facebook FilterMy example')) {
            var configTable = ["parameter VARCHAR(64) NOT NULL", "value VARCHAR(255) NOT NULL", "PRIMARY KEY (parameter)"];
            var filterTable = ["content VARCHAR(255) NOT NULL, contentType VARCHAR(16) NULL, PRIMARY KEY (content)"];
            chromeDb.createTable("configuration", configTable);
        chromeDb.createTable("filter", filterTable);}
     }
}

The SELECT query

Picking up data from a database (SELECT) requires a callback, since the function built cannot return data from the direct call, so a query should look like this:

...