On Tue, Feb 2, 2016 at 9:08 PM, Gijs Kruitbosch <gijskruitbo...@gmail.com> wrote:
> On 02/02/2016 12:36, Philip Chee wrote: > >> On 01/02/2016 18:17, Philipp Kewisch wrote: >> >>> You can use runtime checks for the OS, e.g. using Services.appinfo >>> >>> Philipp >>> >> >> Dude, he's talking about XUL, not JS. Please stop giving useless advice. >> > > It's perfectly possible to runtime-change the DOM tree as needed from JS, > either using DOM methods or using overlays and loadOverlay(). > > Firefox now uses AppConstants.jsm (e.g. `if (AppConstants.platform == > "macosx")` in many places to do things we used to do with ifdefs. That > sometimes includes migrating the ifdefs out of the XUL and making > behavioural changes at runtime instead. > > Please be respectful of other people's efforts to answer questions - > especially when the question is very tersely formulated and it is not > entirely clear what the scope of the question or possible solutions is. Thanks you all, I know how to deal with the problem with Javascript or overlay, but that's not I wanted, overlay doesn't support in Newest extensions, and javascript means I have to carefully writing down code for different platform and would be redundant. In deed, I ask this question because the whole mozilla source tree still need to preprocess XUL/html files for different OS/Target, and that's stopping us to wipe out the preprocess building system for those files. If we have simple runtime directive to direct which part of XUL files should be exclude out , Like IE(<!- if IE ) does, that's would be a good way to move the current if def instruction out. But seems there is no way to do that. > > > ~ Gijs > > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > -- 此致 礼 罗勇刚 Yours sincerely, Yonggang Luo _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform