Hi,

I'm wondering whether "Here Document" was ever discussed to be a
standard JavaScript feature? If there was, could someone point me to
the thread? I know that ES4 draft had triple-quote string literal, but
was that notation abandoned completely?

Now that WebGL 1.0 is out, but it's very cumbersome to have to write
<script type="x-shader/x-fragment"> in the HTML and do textContent.
Khronos has announced that they are going to work on WebCL, so I think
Here Document will be appreciated by many JS programmers.

As a note, at the moment, we have below ways to write multi-line
texts.

"a\n"+"b\n"+"c"

["a", "b", "c"].join("\n")

"a\
b\
c"

(function(){/*a
b
c*/}).toString().replace(/^.*?\n/,'').replace(/\n.*?$/,''); // not on
SpiderMonkey

<>a
b
c</>.toString(); // only in SpiderMonkey

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to