Skip to Content
만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술
book

만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술

by 한민주, 양찬석, 탈 아터
April 2019
Beginner to intermediate
368 pages
7h 18m
Korean
Hanbit Media, Inc.
Content preview from 만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술
250 - 프로그레시브 웹 앱
다 되었습니다!
HTML
링크를 간단히 개선함으로써 링크를 클릭하면 현재 윈도
우 창뿐만 아니라 특정 기준
(
예. 내 계정 페이지를 보여주는 모든 윈도우
)
과 일치하는 모
든 열려 있는 윈도우도 해당
URL
로 이동하도록 만들었습니다.
이를 위한 로직은 비교적 간단합니다.
페이지를 제어하는 서비스 워커가 있다면 로그아웃 링크의 기본 액션을 오버라이
override
하고, 대신 "
logout
" 액션을 수행하라는 메시지를 서비스 워커로 보냅
니다. 서비스 워커는 이 메시지를 기다리고 있다가 메시지가 감지되면
URL
"/
my
-
account
"을 포함하고 있고 서비스 워커가 제어하고 있는 모든 윈도우에 메
시지를 보내 "
navigate
" 액션을 수행 하도록 합니다. 각 페이지는 이 메시지를
기다리고 있다가 메시지가 감지되면 메시지를 통해 전달된
URL
로 이동합니다.
예제 코드에서 이벤트 리스너를 추가하기 전에 서비스 워커가 페이지를 제어하고 있
는지 확인하지 않고 있습니다. 이것이 가능한 이유에 주목해야 합니다. 서비스 워커가
현재 제어하고 있는 페이지만 서비스 워커에 메시지를 게시할 수 있는 반면, 그 어떤
페이지도 수신되는 메시지에 대해서는 이벤트 리스너를 추가할 수 있습니다.
235
페이지의 ‘서비스 워커에서 열려있는 모든 윈도우로 메시지 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

파이썬으로 웹 크롤러 만들기: 초간단 나만의 웹 크롤러로 원하는 데이터 가져오는 방법

파이썬으로 웹 크롤러 만들기: 초간단 나만의 웹 크롤러로 원하는 데이터 가져오는 방법

한선용, 라이언 미첼

Publisher Resources

ISBN: 9791162248737