본문 바로가기 메뉴 바로가기

devbible

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

devbible

검색하기 폼
  • 전체보기 (356)
    • Tips (44)
    • News (32)
    • Event (10)
    • Travel (0)
    • Review (2)
    • Development (266)
    • etc (1)
  • 방명록

Overriding (1)
[JavaScript] Method Overriding

자바스크립트는 자바와는 다르게 기본적으로 메소드 오버라이딩을 지원하지 않는다. 때문에 사용자가 메소드 오버라이딩 소스를 만들어 적용해주어야 한다. function addMethod(object, name, fn){ var old = object[ name ]; object[ name ] = function(){ if ( fn.length == arguments.length ) return fn.apply( this, arguments ); else if ( typeof old == 'function' ) return old.apply( this, arguments ); }; } // Now setup the methods function Users(){ addMethod(this, "find", func..

Development 2010. 12. 27. 00:27
이전 1 다음
이전 다음
최근에 올라온 글
글 보관함
Total
Today
Yesterday
TAG
  • redis
  • Collections
  • Spring
  • Eclipse
  • ubuntu
  • vcomp140.dll
  • Linux
  • JavaScript
  • ListView
  • 티스토리 초대장
  • 게임쿠폰
  • Visual Studio 2015
  • WSL
  • dpi
  • Shell
  • MySQL
  • dotnet
  • KitKat
  • MSSQL
  • CentOS
  • 이벤트
  • Java
  • vcamp140.dll
  • 게임
  • android
  • SharedPreferences
  • VisualStudio
  • 쿠폰
  • svn
  • vcruntime140.dll
more

Blog is powered by Tistory / Designed by Tistory

티스토리툴바