Skip to content

pantoken-root / formats/interactions/src / CommandEventish

Atanga: CommandEventish ​

Ko te ahua command/source o te CommandEvent Tauri Kaiwhakaara (kāore anō kia rahi ki ngā momo DOM lib).

Whānui ake ​

  • Event

Ngā Rawa ​

command ​

command: string


source ​

source: Element | null


bubbles ​

readonly bubbles: boolean

Ko te rawa pānui-anake bubbles o te atanga Event e tohu ana mēnā ka pīrangi te pānga ki runga i te rākau DOM, kāore rānei.

MDN Reference

I whakawhiwhia mai i ​

Event.bubbles


cancelBubble ​

cancelBubble: boolean

Kua whakamāharatia te rawa cancelBubble o te atanga Event. Whakamahia Event.stopPropagation() kē. Mēnā ka tautuhia ki te true i mua i te hoki mai i tētahi kaiwhakahaere takahanga, ka ārai i te whakawhānui o te takahanga. I ētahi whakamahinga ā muri ake, kāore he painga ki te tautuhi ki te false. Tirohia te ūnga o te pūtirotiro mō ngā taipitopito.

Kua tukuna ​

MDN Reference

I whakawhiwhia mai i ​

Event.cancelBubble


cancelable ​

readonly cancelable: boolean

Ko te rawa pānui-anake cancelable o te atanga Event e tohu ana mēnā ka taea te whakakore i te takahanga, ā, nō reira ka taea te aukati kia kore ai te takahanga i puta i te tuatahi.

MDN Reference

I whakawhiwhia mai i ​

Event.cancelable


composed ​

readonly composed: boolean

Ko te rawa pānui-anake composed o te atanga Event e whakahoki ana i tētahi uara pono/pohehe e tohu ana mēnā ka whakawhānuihia te takahanga ki tāwāhi o te rohe shadow DOM ki te DOM paerewa, kāore rānei.

MDN Reference

I whakawhiwhia mai i ​

Event.composed


currentTarget ​

readonly currentTarget: EventTarget | null

Ko te rawa pānui-anake currentTarget o te atanga Event e tautohu ana i te tūemi i runga i te mea i tāpirihia te kaiwhakahaere takahanga.

MDN Reference

I whakawhiwhia mai i ​

CommandEventish.currentTarget


defaultPrevented ​

readonly defaultPrevented: boolean

Ko te rawa pānui-anake defaultPrevented o te atanga Event e whakahoki ana i tētahi uara pono e tohu ana mēnā i whakakāhore te karanga ki Event.preventDefault().

MDN Reference

I whakawhiwhia mai i ​

Event.defaultPrevented


eventPhase ​

readonly eventPhase: number

Ko te rawa pānui-anake eventPhase o te atanga Event e tohu ana ko tēhea wāhanga o te rerenga takahanga kei te aromatawai ināianei.

MDN Reference

I whakawhiwhia mai i ​

Event.eventPhase


isTrusted ​

readonly isTrusted: boolean

Ko te rawa pānui-anake isTrusted o te atanga Event he uara whai/korēnei e tūpono ana ki te true ina i hangaia te takahanga e te kaituku-kaiwhakamahi (tae atu ki ngā mahi a te kaiwhakamahi me ngā tikanga hōtaka pērā i HTMLElement.focus()), ā, he false mēnā i tukuna te takahanga mā EventTarget.dispatchEvent(). Ko te tukunga anake ko te takahanga click, mō tēnei ka tūhurahia te rawa isTrusted ki te false i ngā kaituku-kaiwhakamahi.

MDN Reference

I whakawhiwhia mai i ​

Event.isTrusted


returnValue ​

returnValue: boolean

Ko te rawa Event returnValue e tohu ana mēnā kua aukatingia te mahi taunoa mō tēnei takahanga, kāore rānei.

Kua tukuna ​

MDN Reference

I whakawhiwhia mai i ​

Event.returnValue


srcElement ​

readonly srcElement: EventTarget | null

Ko te Event.srcElement kua whakamāharatia he ingoa tauwhāiti mō te rawa Event.target. Whakamahia Event.target kē.

Kua tukuna ​

MDN Reference

I whakawhiwhia mai i ​

CommandEventish.srcElement


target ​

readonly target: EventTarget | null

Ko te rawa pānui-anake target o te atanga Event he whakamārama ki te tūhinga i tukuna ai te takahanga. He rerekē tēnei i te Event.currentTarget ina wa ka karangahia te kaiwhakahaere i te wā e pakaru ana te takahanga i te wā pīrangi (bubbling) hē rānei i te wā whaiwhakarongo (capturing).

MDN Reference

I whakawhiwhia mai i ​

CommandEventish.target


timeStamp ​

readonly timeStamp: number

Ko te rawa pānui-anake timeStamp o te atanga Event e whakahoki ana i te wā (i roto i ngā hēkona-miri) i hanga ai te takahanga.

MDN Reference

I whakawhiwhia mai i ​

Event.timeStamp


type ​

readonly type: string

Ko te rawa pānui-anake type o te atanga Event e whakahoki ana i tētahi taura e kī ana i te momo o te takahanga. Ka tautuhia i te hanga o te takahanga, ā, koinei te ingoa e whakamahia whānuitia ana hei tohu i te takahanga motuhake, pērā i te click, load, rānei error.

MDN Reference

I whakawhiwhia mai i ​

Event.type


NONE ​

readonly NONE: 0

I whakawhiwhia mai i ​

Event.NONE


CAPTURING_PHASE ​

readonly CAPTURING_PHASE: 1

I whakawhiwhia mai i ​

Event.CAPTURING_PHASE


AT_TARGET ​

readonly AT_TARGET: 2

I whakawhiwhia mai i ​

Event.AT_TARGET


BUBBLING_PHASE ​

readonly BUBBLING_PHASE: 3

I whakawhiwhia mai i ​

Event.BUBBLING_PHASE

Ngā Tikanga ​

composedPath() ​

composedPath(): EventTarget[]

Ko te tikanga composedPath() o te atanga Event e whakahoki ana i te ara o te takahanga, arā, he rārangi o ngā tūhinga ka karangahia ngā whakarongo. Kāore tēnei e whakauru i ngā node o ngā rākau ā-ārai (shadow trees) mēnā i hangaia te pūwāhanga shadow ki te ShadowRoot.mode closed.

MDN Reference

Whakahokia ​

EventTarget[]

I whakawhiwhia mai i ​

Event.composedPath


initEvent() ​

initEvent(type, bubbles?, cancelable?): void

Ka whakamahia te tikanga Event.initEvent() hei whakatū i te uara o tētahi takahanga i hangaia mā te Document.createEvent().

Ngā Tawhā ​

type ​

string

bubbles? ​

boolean

cancelable? ​

boolean

Whakahokia ​

void

Kua tukuna ​

MDN Reference

I whakawhiwhia mai i ​

Event.initEvent


preventDefault() ​

preventDefault(): void

Ko te tikanga preventDefault() o te atanga Event e whakamōhio ana ki te kaituku-kaiwhakamahi kei te āta whakahaerehia te takahanga, nō reira kāore e whaihia te mahi taunoa, pērā i te kauwhāki whārangi, te whakatere hono, rānei te whakapiri tuhinga.

MDN Reference

Whakahokia ​

void

I whakawhiwhia mai i ​

Event.preventDefault


stopImmediatePropagation() ​

stopImmediatePropagation(): void

Ko te tikanga stopImmediatePropagation() o te atanga Event e ārai ana i ētahi atu kaipāho o taua takahanga kia kore e karangahia.

MDN Reference

Whakahokia ​

void

I whakawhiwhia mai i ​

Event.stopImmediatePropagation


stopPropagation() ​

stopPropagation(): void

Ko te tikanga stopPropagation() o te atanga Event e ārai ana i te whakawhānuitanga o te takahanga ināianei i ngā wāhanga hopu (capturing) me te pīrangi (bubbling). Heoi, kāore e aukati i ngā whanonga taunoa; hei tauira, ka noho tonu ngā pāwhiri ki ngā hononga kia whakahaeretia. Mēnā e hiahia ana koe ki te aukati i ēnei whanonga, tirohia te tikanga preventDefault(). Kāore hoki e ārai i te whakawhānuitanga ki ērā atu kaiwhakahaere o taua tūemi. Mēnā e hiahia ana koe ki te aukati i ēnei, tirohia te stopImmediatePropagation().

MDN Reference

Whakahokia ​

void

I whakawhiwhia mai i ​

Event.stopPropagation