<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>26508</bug_id>
          
          <creation_ts>2014-08-03 08:13:34 +0000</creation_ts>
          <short_desc>// first set phone into peering mode</short_desc>
          <delta_ts>2014-08-04 17:45:05 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>26512</dup_id>
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#top</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>109799</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-08-03 08:13:34 +0000</bug_when>
    <thetext>Specification: http://www.w3.org/TR/webmessaging/
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top
Referrer: 

Comment:
  // first set phone into peering mode
   // nfcService is the NFC service, discovered through the webinos Discovery
API, that has been selected by the user   
   nfcService.peer(success, fail);
 
 function success (channel)
 {
   console.log(&quot;successfully initiated peering mode&quot;);
 
   // to send a message to the other device
   channel.port1.postMessage(&apos;hello&apos;);
 
   // to receive a message from the other device
   // first you set a message handler
   channel.port1.onmessage = handleMessage;
 
   // you next instruct the channel to dispatch events
   // you can later close the port with the stop() method
   // your device then reverts to its normal mode
   channel.port1.start();
 }
 
 function handleMessage(event)
 {
   // message is in event.data
   // ...
 }
 
 // after a time out when peering couldn&apos;t be established
 function fail ()
 {
   console.log(&quot;failed to initiate peering mode&quot;);
 }


Posted from: 61.228.227.139
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109853</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-08-04 17:45:05 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 26512 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>