mozilla :: #mdn

16 May 2017
14:36woodydan_could anyone tell how to HTMLELement in browser
14:38araiwhat do you mean by "how to HTMLELement" ?
14:39woodydan_I use firefox console, when type HTMLElement ,it respond it is a function
14:41woodydan_when I type this "var obj=new HTMLElement()", the browser give an error
14:42sheppystandups: Converted example on createDocumentFragment() page into live sample.
14:42standupsOk, submitted #46211 for
14:42araiwoodydan_: what are you trying to do?
14:44araiif you want to create an element, you can do document.createElement("...")
14:45woodydan_I Know it is a DOM type, but I don t know how to use the type
14:46araiyou can use it like `document.body instanceof HTMLElement`
14:46araiit's not for constructing element instance, iiuc
14:49sheppystandups: Completed copy-edit and standardization of
14:49standupsOk, submitted #46213 for
14:52jwhitlockwoodydan_: what problem are you trying to solve?
14:54jwhitlockwoodydan_ says - i just dont understand why browser forbidden us to use this type like other constructor
14:56woodydan_ I am till confused that why browser build this DOM type ,but forbidden us to use it like other type
14:58jwhitlockIf you are curious "Why do I have to use document.createElement()", then it may help to read the DOM spec for what happens when you run that function:
14:58jwhitlockor maybe start from here
15:01jwhitlockbut most people aren't curious about that. They need to update a webpage with new elements, so they use document.createElement, and don't ask why -
15:02woodydan_so I am we weird:grin:
15:02* sheppy would never ever say such a thing. :)
15:04jwhitlockwell, you are in the right place for that kind of weirdness
15:04jwhitlockthis is where the spec-obsessed folks are. Well, that, and whatever W3C uses for chat
15:05sheppyYeah, those of us who document this stuff spend a lot of time buried in the spec. :)
15:08jwhitlockalso, you can do strange things by extending HTMLElement, but it looks like you still use document.createElement -
15:08jwhitlockI'm not sure if we have the MDN equivalent of that page
15:09sheppyI don't think so. I don't think we've gotten into custom elements yet.
15:11woodydan_well, I know , I shouldn't waste time on this kind of things
21:18marcosomething like &quot;<li>The documentation in {{ Source(&quot;js/xpconnect/idl/xpccomponents.idl&quot;, &quot;xpccomponents.idl&quot;) }}</li>&quot;
21:18marcoin MDN
21:18marcois pointing to MXR
21:19marcocan we change it to point to DXR?
21:20jwhitlockmarco: Source is a macro, and the source is on github -
21:20jwhitlockthe macro already points to DXR
21:20marcojwhitlock: it looks like it&#39;s using dxr, but is pointing to MXR
21:21marcoif you look at the &quot;Additional Resources&quot; section
21:21* jwhitlock looks
21:21marcoI&#39;ve just fixed it
21:21marcoI just needed to publish it again, with no changes
21:21marcoI guess the macro isn&#39;t applied until you save the page
21:22jwhitlockthat&#39;s right, it is only applied on render
21:22marcothis means it might be worth regenerating all the pages where the macro is used
21:22jwhitlocka force-refresh as a logged in user also causes a re-render
21:23jwhitlockthat&#39;s a very old bug, but 772704
21:23HavvyThere&#39;s no queue to automatically update pages that have macros that changed?
21:24jwhitlocksorry bug 772704
21:24firebot NEW, When a template is updated, the pages including this template should be regenerated
21:27jwhitlocknope, there is no mechanism for automatically updating pages
21:55sheppyIt&#39;s something that we&#39;ve had on the &quot;sure would be nice&quot; list since forever though :)
21:56sheppyjwhitlock: I will say that one of the reasons we didn&#39;t do it beforethat macros sometimes change several times in a row while being updatedis no longer an issue with them having moved to github.
22:07jwhitlockthere&#39;s always reasons not to do hard work...
22:07sheppyOf course :)
22:08jwhitlockI think we have a few reasons to periodically rebuild pages, such as
22:09jwhitlockI think it fits in our papercut process
22:09jwhitlockalso, Q3 and Q4 might be where I aggressively triage the bugs and feature requests
22:09jwhitlockwe need a backlog
22:13sheppyI think it might at least be worth thinking about doing like a quarterly rebuild or something like that.
22:13sheppystandups: First draft of
22:13standupsOk, submitted #46232 for
22:14sheppystandups: Updates to
22:14standupsOk, submitted #46233 for
22:14sheppystandups: Added more details to
22:14standupsOk, submitted #46234 for
17 May 2017
No messages
Last message: 12 days and 15 hours ago