firefox addon sdk - sdkaddon: How ('sdk/window/utils').openDialog can navigate to url? -
in sdkaddon, have part of code
win = require('sdk/window/utils').opendialog({ features: object.keys({ resizable: true, }).join() + ',width='+w+',height='+h+',top='+pos.top+',left='+pos.left, name: 'mywin' }); win.addeventlistener('load', function () { tabs.activetab.on('ready', function (tab) { }); tabs.activetab.url = "http://www.example.com"; });
which creates new popup , goes example.com
how can later change url of win (navigate url ?)
win.url = "http://www.example2.com" not work
you pretty close!
to open new tab particular url:
const tabs = require("sdk/tabs"); tabs.open("http://www.example2.com");
that's it, there's nothing it.
Comments
Post a Comment