<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[TNF : Tatter Network Foundation forum - 브라우저 구별 코드를 개선해야 하지 않을까요?]]></title>
	<link rel="self" href="http://forum.tattersite.com/ko/extern.php?action=feed&amp;tid=1418&amp;type=atom"/>
	<updated>2006-08-23T15:36:36Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.tattersite.com/ko/viewtopic.php?id=1418</id>
		<entry>
			<title type="html"><![CDATA[RSS 답글: 브라우저 구별 코드를 개선해야 하지 않을까요?]]></title>
			<link rel="alternate" href="http://forum.tattersite.com/ko/viewtopic.php?pid=8158#p8158"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>inureyes 작성:</cite><blockquote><p>넵 반영하겠습니다^^</p></blockquote></div><p>고맙습니다. <img src="http://forum.tattersite.com/ko/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[화성]]></name>
				<uri>http://forum.tattersite.com/ko/profile.php?id=463</uri>
			</author>
			<updated>2006-08-23T15:36:36Z</updated>
			<id>http://forum.tattersite.com/ko/viewtopic.php?pid=8158#p8158</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[RSS 답글: 브라우저 구별 코드를 개선해야 하지 않을까요?]]></title>
			<link rel="alternate" href="http://forum.tattersite.com/ko/viewtopic.php?pid=8157#p8157"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>화성 작성:</cite><blockquote><p>마인필드/본에코가 정식 버전이 아니라 이런 얘기가 적절하지 않을 수도 있겠지만, 얘기드리겠습니다.</p><p><a href="http://forums.mozilla.or.kr/viewtopic.php?t=7739">한글 모질라 포럼에 글이 올라와서</a> 알아보니, EAF.js에 브라우저를 구별하는 코드가 있더군요. 그 가운데 파이어폭스인지를 알아보는 코드는 다음과 같고요.<br /></p><div class="codebox"><pre><code>Standardizer.prototype.isFirefox=(navigator.userAgent.indexOf(&quot;Firefox&quot;)&gt;=0);</code></pre></div><p>유저 에이전트 문자열에 &#039;Firefox&#039;가 있으면 파이어폭스라는 건데, 아직은 큰 문제가 없겠지만 나중에는 문제가 될 수도 있을 것 같거든요. 유저 에이전트 문자열은 얼마든지 속일 수 있는 것이고, 모질라의 게코(Gecko) 엔진을 쓰는 브라우저도 많아지고 있지요. 즉 게코 엔진의 버전별로 구분하던지 특정 기능을 지원하는지를 판별하는 게 낫지 않을까요?</p><p>특히 이 부분은 좀 고쳐야 할 것 같은데요.<br /></p><div class="codebox"><pre><code>// 각종 환경 초기화
TTEditor.prototype.initialize = function(textarea, imageFilePath, mode, newLine) {
   // execCommand가 사용가능한 경우에만 위지윅을 쓸 수 있다. (지금은 Internet Explorer, Firefox만 지원한다)
   if(typeof(document.execCommand) == &quot;undefined&quot; || !(STD.isIE || STD.isFirefox))
      return;

   // 위지윅모드로 시작
   this.editMode = mode;</code></pre></div><p>주석만 보면 execCommand를 쓸 수 있나 없나가 중요한데, 또 브라우저를 구별하는 바람에 execCommand가 있어도 위지윅 모드를 쓸 수 없는 경우가 생기네요. 정식 버전이 아닌 것을 지원해달라고는 얘기하지 못하겠지만 위의 조건문은 좀 고쳐주시면 감사하겠습니다.</p></blockquote></div><p>넵 반영하겠습니다^^</p>]]></content>
			<author>
				<name><![CDATA[inureyes]]></name>
				<uri>http://forum.tattersite.com/ko/profile.php?id=2</uri>
			</author>
			<updated>2006-08-23T14:57:04Z</updated>
			<id>http://forum.tattersite.com/ko/viewtopic.php?pid=8157#p8157</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[브라우저 구별 코드를 개선해야 하지 않을까요?]]></title>
			<link rel="alternate" href="http://forum.tattersite.com/ko/viewtopic.php?pid=8151#p8151"/>
			<content type="html"><![CDATA[<p>마인필드/본에코가 정식 버전이 아니라 이런 얘기가 적절하지 않을 수도 있겠지만, 얘기드리겠습니다.</p><p><a href="http://forums.mozilla.or.kr/viewtopic.php?t=7739">한글 모질라 포럼에 글이 올라와서</a> 알아보니, EAF.js에 브라우저를 구별하는 코드가 있더군요. 그 가운데 파이어폭스인지를 알아보는 코드는 다음과 같고요.<br /></p><div class="codebox"><pre><code>Standardizer.prototype.isFirefox=(navigator.userAgent.indexOf(&quot;Firefox&quot;)&gt;=0);</code></pre></div><p>유저 에이전트 문자열에 &#039;Firefox&#039;가 있으면 파이어폭스라는 건데, 아직은 큰 문제가 없겠지만 나중에는 문제가 될 수도 있을 것 같거든요. 유저 에이전트 문자열은 얼마든지 속일 수 있는 것이고, 모질라의 게코(Gecko) 엔진을 쓰는 브라우저도 많아지고 있지요. 즉 게코 엔진의 버전별로 구분하던지 특정 기능을 지원하는지를 판별하는 게 낫지 않을까요?</p><p>특히 이 부분은 좀 고쳐야 할 것 같은데요.<br /></p><div class="codebox"><pre><code>// 각종 환경 초기화
TTEditor.prototype.initialize = function(textarea, imageFilePath, mode, newLine) {
   // execCommand가 사용가능한 경우에만 위지윅을 쓸 수 있다. (지금은 Internet Explorer, Firefox만 지원한다)
   if(typeof(document.execCommand) == &quot;undefined&quot; || !(STD.isIE || STD.isFirefox))
      return;

   // 위지윅모드로 시작
   this.editMode = mode;</code></pre></div><p>주석만 보면 execCommand를 쓸 수 있나 없나가 중요한데, 또 브라우저를 구별하는 바람에 execCommand가 있어도 위지윅 모드를 쓸 수 없는 경우가 생기네요. 정식 버전이 아닌 것을 지원해달라고는 얘기하지 못하겠지만 위의 조건문은 좀 고쳐주시면 감사하겠습니다.</p>]]></content>
			<author>
				<name><![CDATA[화성]]></name>
				<uri>http://forum.tattersite.com/ko/profile.php?id=463</uri>
			</author>
			<updated>2006-08-23T13:46:43Z</updated>
			<id>http://forum.tattersite.com/ko/viewtopic.php?pid=8151#p8151</id>
		</entry>
</feed>
