简体   繁体   中英

Firefox simple extension to create window as an popup

i would like to create simple below window on firefox. i'm trying to develop simple extension for some feature. now i can not create window like with windows window instead of Popup and i can not find any document about that

在此处输入图片说明

You should look at the source for the pixel perfect extension as it does something similar to your ( somewhat vague ) description:

https://github.com/firebug/pixel-perfect/wiki

You can use 'window/utils' SDK API and its openDialog() function:

require('sdk/window/utils').openDialog({
  url: 'http://stackoverflow.com',
  name: 'My pop-up window!',
  features: 'height      = 180, ' +
            'width       = 320, ' +
            'toolbar     = no, ' +
            'menubar     = no, ' +
            'scrollbars  = no, ' +
            'resizable   = no, ' +
            'location    = no, ' +
            'directories = no, ' +
            'status      = no'
});

This API is described here: https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/window_utils

And here you can find full list of supported features for openDialog() : https://developer.mozilla.org/pl/docs/Web/API/Window/open

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM