Several of Ubuntu flavors distinguish themselves with inclusion of a specific desktop environment. They are one of the core features of that flavor. Hence, a question focusing on desktop environment is still on topic, because of its inclusion as part of an Ubuntu flavor. Desktop environments that are not part of any official flavor but can be used with Ubuntu require attention as well, but within certain scope : as long as the question about a DE ( for instance Cinnamon ) remains relevant to Ubuntu , then it's ok. 

> How about a question asking for how to use the GNOME Extensions API to do something in the code

Questions such as "how do i reprogram Cinnamon to do XYZ" , I would consider off-topic , because it's more about coding and less about DE's use on Ubuntu. There is however a very thin line here, because AskUbuntu also supports questions related to development on Ubuntu.  As log as the question remains  relevant to Ubuntu, IMHO, it is welcome