{"id":217971,"date":"2014-04-02T14:28:02","date_gmt":"2014-04-02T10:28:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=217971"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=217971","title":{"rendered":"<span class=\"post_title\">\u041d\u0430\u0448 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e JS \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0412\u0430\u043c\u0438 \u043d\u0430\u0448\u0438\u043c <i>( \u043e \u0442\u043e\u043c \u043a\u0442\u043e \u0442\u0430\u043a\u0438\u0435 \u041c\u042b \u2014 \u044f \u0441\u043c\u043e\u0433\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0437\u0436\u0435 )<\/i> \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e <b>JS<\/b> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/1e9\/556\/093\/1e9556093926785ef223923fcfcc5cb7.jpg\" \/><\/div>\n<p>  <\/p>\n<h5>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h5>\n<p>  \u0412 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043e\u0449\u043d\u044b\u0435 \u2014 \u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u0441\u043b\u043e\u0436\u043d\u044b\u0435, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 <i>(\u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c)<\/i>, \u0432 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0435 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u2014 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<br \/>  \u0427\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u043e\u0442\u043a\u043b\u0438\u043a\u043e\u043c \u0438 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0442\u0430\u043a \u0438 \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 <i>(\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0438 \u0442\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u043f\u043e \u0441\u0430\u043c\u043e\u0435 \u00ab\u043d\u0435\u0431\u0430\u043b\u0443\u0439\u00bb)<\/i>.<br \/>  \u041d\u043e \u0434\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044e \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/>  \u0412\u043e\u0442 \u043e \u0442\u0430\u043a\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u044f \u0438 \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c. <br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5>\u0421\u0435\u0440\u0432\u0435\u0440<\/h5>\n<p>  \u041a\u043b\u0438\u0435\u043d\u0442 \u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441 API \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043d\u0438\u043a\u0430\u043a\u0438\u043c\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f.<br \/>  \u0412\u0441\u044e \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0437\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0431\u0435\u0440\u0451\u0442 \u043d\u0430 \u0441\u0435\u0431\u044f \u043a\u043b\u0438\u0435\u043d\u0442.<\/p>\n<h5>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0430\u043f\u043e\u043a<\/h5>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/d0c\/2dc\/6ef\/d0c2dc6ef78fc74e43cc15d0034624d4.png\" \/><\/div>\n<p>  \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u2014 \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u2014 \u0431\u044b\u043b\u043e \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c.<br \/>  \u041f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043f\u0430\u043f\u043e\u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d \u043d\u0430 3 \u0447\u0430\u0441\u0442\u0438: <b>\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/b>, <b>\u043c\u043e\u0434\u0443\u043b\u0438<\/b> \u0438 <b>\u0430\u0434\u0434\u043e\u043d\u044b<\/b>.<\/p>\n<p>  <b>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/b> \u2014 \u044d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435, \u043d\u043e \u0441\u0430\u043c\u0438 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.  <\/p>\n<ul>\n<li>JQuery \u0438 \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430\u0434 \u043d\u0438\u043c<\/li>\n<li>\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b UI<\/li>\n<li>\u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u0438\u0444\u0438\u043b\u044b<\/li>\n<li>\u043f\u0440\u043e\u0447\u0435\u0435<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0434 <b>\u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438<\/b> \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0441\u0430\u0439\u0442\u0430, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e \u043a\u0443\u0441\u043e\u0447\u043a\u0430\u043c\u0438 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u044c \u043a\u043b\u0438\u0435\u043d\u0442.<br \/>  <b>\u0410\u0434\u0434\u043e\u043d\u044b<\/b> \u0434\u0443\u043c\u0430\u044e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u2014 \u044d\u0442\u043e \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430\u0434 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c.<\/p>\n<h5>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0444\u0430\u0439\u043b\u043e\u0432<\/h5>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/dd3\/118\/163\/dd31181631ed017f4e23e6e57126a0d7.png\" \/><\/div>\n<p>  \u0424\u0430\u0439\u043b\u044b \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u043e\u0436\u0435 \u0438\u0433\u0440\u0430\u044e\u0442 \u0432\u0430\u0436\u043d\u0443\u044e \u0440\u043e\u043b\u044c \u2014 \u0438\u043c\u0435\u0435\u0442\u0441\u044f <b>6 \u0432\u0438\u0434\u043e\u0432<\/b> \u0444\u0430\u0439\u043b\u043e\u0432:  <\/p>\n<ul>\n<li><b>*.boot.js<\/b> \u2014 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0440\u043e\u043b\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0432 \u043d\u0451\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u043e\u043c \u2014 \u043a\u0442\u043e \u0438 \u043a\u043e\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0438.<\/li>\n<li><b>*.core.js<\/b> \u2014 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0432\u0441\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0435 \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e <i>(\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432 \u043d\u0451\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 <b>core<\/b>)<\/i>.<\/li>\n<li><b>*.interface.js<\/b> \u2014 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0432\u0438\u0434\u043e\u043c \u2014 \u0441 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u043e\u043c \u043b\u043e\u0433\u0438\u043a\u0438 <i>(\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432 \u043d\u0451\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 <b>interface<\/b>)<\/i>.<\/li>\n<li><b>*.api.js<\/b> \u2014 API \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c <i>(\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0443\u043b\u044f\u043c, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 <b>api<\/b>)<\/i><\/li>\n<li><b>*.style.css<\/b> \u2014 \u043d\u0430\u0431\u043e\u0440 \u0441\u0442\u0438\u043b\u0435\u0439 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f\/\u0430\u0434\u0434\u043e\u043d\u0430<\/li>\n<li><b>*.js<\/b> \u2014 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 <i>(\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0440\u0435\u0434\u043a\u043e, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a)<\/i><\/li>\n<\/ul>\n<p>  <\/p>\n<h5>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/h5>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442\u044b \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u0435\u044e\u0442 2 \u0432\u0438\u0434\u0430:<\/p>\n<p>  <b>\u041a\u043b\u0430\u0441\u0441<\/b> \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e: \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\/\u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430.  <\/p>\n<pre><code class=\"javascript\">var core = (function( core ) { \twith( core ) \t{ \t\tcore.NewClass = function( params ) \t\t{ \t\t\t\/** \u041a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u043e\u0434 **\/ \t\t\treturn this; \t\t};  \t\tNewClass.prototype.func1 = function( ) \t\t{ \t\t\t\/** \u041a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u043e\u0434 **\/ \t\t\treturn this; \t\t}; \t}  \treturn core; })( core || {} ); <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"javascript\">var class = new core.NewClass( params ); \/\/ \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c core \u0435\u0441\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u0432 \u0442\u043e\u0439-\u0436\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 class.func1( ); <\/code><\/pre>\n<p>  <b>\u041e\u0431\u044a\u0435\u043a\u0442<\/b> \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445.  <\/p>\n<pre><code class=\"javascript\">var core = (function( core ) { \twith( core ) \t{ \t\tcore.obj1 = \t\t{ \t\t\tparamList: [], \t\t\tparam1: 0,  \t\t\tfunc1: function( ) \t\t\t{ \t\t\t\t\/** \u041a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u043e\u0434 **\/ \t\t\t\treturn this; \t\t\t},  \t\t\tfunc2: function( ) \t\t\t{ \t\t\t\t\/** \u041a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u043e\u0434 **\/ \t\t\t\treturn this; \t\t\t} \t\t} \t}  \treturn core; })( core || {} ); <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"javascript\">core.obj1.func1( ) \/\/ \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c core \u0435\u0441\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u0432 \u0442\u043e\u0439-\u0436\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \t\t.func2( ); <\/code><\/pre>\n<p>  <\/p>\n<h5>\u041e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438<\/h5>\n<p>  \u0423 \u043d\u0430\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f 3 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 <i>(\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u043e\u0433\u0434\u0430 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445)<\/i>:  <\/p>\n<ul>\n<li>api<\/li>\n<li>core<\/li>\n<li>interface<\/li>\n<\/ul>\n<p>  \u0420\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0438 \u043d\u0435 \u043f\u0430\u0440\u0438\u0442\u0441\u044f \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043f\u0440\u043e\u0447\u0435\u0433\u043e:  <\/p>\n<pre><code class=\"javascript\">var interface = (function( interface ) { \twith( interface ) \t{ \t\tinterface.NewClass = function( params ) \t\t{ \t\t\t\/** \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 **\/ \t\t};  \t\tNewClass.prototype.show = function( ) \t\t{ \t\t\t\/** \u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 **\/ \t\t\treturn this; \t\t};  \t\tNewClass.prototype.hide = function( ) \t\t{ \t\t\t\/** \u0421\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 **\/ \t\t\treturn this; \t\t}; \t}  \treturn core; })( core || {} ); <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"javascript\">var core = (function( core ) { \twith( core ) \t{ \t\tcore.NewClass = function( params ) \t\t{ \t\t\tthis.interface = new interface.NewClass( ); \t\t};  \t\tNewClass.prototype.show = function( ) \t\t{ \t\t\tthis.interface.show( ); \t\t\t\/** \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430 **\/  \t\t\treturn this; \t\t};  \t\tNewClass.prototype.hide = function( ) \t\t{ \t\t\t\/** \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0434\u043e \u0435\u0433\u043e \u0441\u043a\u0440\u044b\u0442\u0438\u044f **\/ \t\t\tthis.interface.hide( );  \t\t\treturn this; \t\t}; \t}  \treturn core; })( core || {} ); <\/code><\/pre>\n<p>  \u041d\u0443 \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 <i>(\u0438 \u0442\u0430\u043a\u043e\u0439 \u041e\u041e\u041f \u043f\u043e\u0434\u0445\u043e\u0434)<\/i> \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u044b: <b>\u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u043d\u0430\u0442\u044c \u043e \u0434\u0440\u0443\u0433\u043e\u043c, \u043f\u043e\u043a\u0430 \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u0436\u0451\u0441\u0442\u043a\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438<\/b>.<br \/>  \u041f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <b>bind<\/b>`\u043e\u0432 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <i>(\u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043b\u0435\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0442\u0430\u043a \u0438 \u0432 \u043a\u043e\u043d\u0435\u0446, \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0435\u0451 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438\u043b\u0438-\u0436\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445)<\/i>.<br \/>  \u041d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u2014 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437.<br \/>  <habracut text=\"\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435...\"\/> \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/217971\/\"> http:\/\/habrahabr.ru\/post\/217971\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0412\u0430\u043c\u0438 \u043d\u0430\u0448\u0438\u043c <i>( \u043e \u0442\u043e\u043c \u043a\u0442\u043e \u0442\u0430\u043a\u0438\u0435 \u041c\u042b \u2014 \u044f \u0441\u043c\u043e\u0433\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0437\u0436\u0435 )<\/i> \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e <b>JS<\/b> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/1e9\/556\/093\/1e9556093926785ef223923fcfcc5cb7.jpg\" \/><\/div>\n<p>  <\/p>\n<h5>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h5>\n<p>  \u0412 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043e\u0449\u043d\u044b\u0435 \u2014 \u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u0441\u043b\u043e\u0436\u043d\u044b\u0435, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 <i>(\u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c)<\/i>, \u0432 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0435 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u2014 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<br \/>  \u0427\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u043e\u0442\u043a\u043b\u0438\u043a\u043e\u043c \u0438 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0442\u0430\u043a \u0438 \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 <i>(\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0438 \u0442\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u043f\u043e \u0441\u0430\u043c\u043e\u0435 \u00ab\u043d\u0435\u0431\u0430\u043b\u0443\u0439\u00bb)<\/i>.<br \/>  \u041d\u043e \u0434\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044e \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/>  \u0412\u043e\u0442 \u043e \u0442\u0430\u043a\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u044f \u0438 \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-217971","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/217971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=217971"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/217971\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=217971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=217971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=217971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}