For the Firefox Developer Tools, we need to be able to hide the scrollbars of
a document (in the "Responsive Design Tool").

I thought that loading an stylesheet that hide the scrollbars via the new 
`loadSheet` method might help.
https://hg.mozilla.org/mozilla-central/diff/4d529ec2c6ea/dom/interfaces/base/nsIDOMWindowUtils.idl#l1.34

I tried this:

```
let win = gBrowser.contentWindow;
let gIOService = 
Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
let windowUtils = 
win.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIDOMWindowUtils);
let uri = gIOService.newURI('data:text/css,@namespace 
url("http://www.w3.org/1999/xhtml";);@namespace xul 
url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";);html 
xul|scrollbar {display:none}', null, null);
windowUtils.loadSheet(uri, windowUtils.AGENT_SHEET);
```

But it doesn't appear to work.

Any idea?

-- Paul
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to