[webkit-help] where/how does Document.write get implemented?

Julien Chaffraix julien.chaffraix at gmail.com
Mon Nov 5 01:50:31 PST 2012

> I'd like to see if I can get Document.write method working.
> However, I'm having hard time finding where that is being
> implemented when using the normal JavaScriptCore, which makes
> it difficult for me to figure out the right way to do it when
> using Nashorn.  I haven't found the write method in Document.idl,
> nor is it in JSDocument.{h,cpp} nor in JSDocumentCustom.cpp.
> So where is it coming from?

document.write is only exposed for HTML documents so the binding is
defined in Source/WebCore/html/HTMLDocument.idl and implemented in
JSHTMLDocumentCustom.cpp for JavaScriptCore as it is a [Custom]
binding. The implementation of the write() function is on Document
though which is probably what confused you.

Hope it helps,

More information about the webkit-help mailing list