Here is what I got from an email exchange I had with IRD some time ago:
The Hong Kong tax system is based on the territorial concept not on residential basis. Salaries Tax is imposed on all income arising in or derived from Hong Kong from an employment.
According to the Inland Departmental Interpretation and Practice Note No. 10, an employment is regarded outside Hong Kong if all of the following three conditions are satisfied.
1. The employment contract is negotiated, concluded and enforceable outside Hong Kong.
2. The employer is resident outside Hong Kong
3. The remuneration is paid outside Hong Kong.
However, if any one condition has not been fulfilled, then the employment is regarded as in Hong Kong. The consequence of a Hong Kong employment is that all the income from the employment is taxable in Hong Kong even though the employee performs most of the services outside Hong Kong.
If it is a non Hong Kong employment contract, then only income derived from services rendered in Hong Kong is chargeable with Hong Kong salaries tax under Section 8(1A) of the Inland Revenue Ordinance. This is usually determined by the number of days the employee stayed in Hong Kong during the basis period of each year of assessment. This is referred as "Time Basis".
Hope it helps